From d5eb3cf5e7e4274e12e0f249b3a026c029f3b02c Mon Sep 17 00:00:00 2001 From: Lars Schneider Date: Sun, 4 Dec 2016 17:03:37 +0100 Subject: git-p4: fix empty file processing for large file system backend GitLFS 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 Signed-off-by: Junio C Hamano --- t/t9824-git-p4-git-lfs.sh | 2 ++ 1 file changed, 2 insertions(+) (limited to 't') diff --git a/t/t9824-git-p4-git-lfs.sh b/t/t9824-git-p4-git-lfs.sh index 110a7e792..734b8db4c 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 && -- cgit v1.2.1