summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLars Schneider <larsxschneider@gmail.com>2016-12-04 17:03:37 +0100
committerJunio C Hamano <gitster@pobox.com>2016-12-05 14:57:33 -0800
commitd5eb3cf5e7e4274e12e0f249b3a026c029f3b02c (patch)
tree1b35de2367855a3ffecdc42245183793575842e5 /t
parent454cb6bd52a4de614a3633e4f547af03d5c3b640 (diff)
downloadgit-d5eb3cf5e7e4274e12e0f249b3a026c029f3b02c.tar.gz
git-p4: fix empty file processing for large file system backend GitLFSls/p4-empty-file-on-lfs
If git-p4 tried to store an empty file in GitLFS then it crashed while parsing the pointer file: oid = re.search(r'^oid \w+:(\w+)', pointerFile, re.MULTILINE).group(1) AttributeError: 'NoneType' object has no attribute 'group' This happens because GitLFS does not create a pointer file for an empty file. Teach git-p4 this behavior to fix the problem and add a test case. Signed-off-by: Lars Schneider <larsxschneider@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-xt/t9824-git-p4-git-lfs.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/t/t9824-git-p4-git-lfs.sh b/t/t9824-git-p4-git-lfs.sh
index 110a7e7924..734b8db4cb 100755
--- a/t/t9824-git-p4-git-lfs.sh
+++ b/t/t9824-git-p4-git-lfs.sh
@@ -42,6 +42,8 @@ test_expect_success 'Create repo with binary files' '
(
cd "$cli" &&
+ >file0.dat &&
+ p4 add file0.dat &&
echo "content 1 txt 23 bytes" >file1.txt &&
p4 add file1.txt &&
echo "content 2-3 bin 25 bytes" >file2.dat &&