diff --git a/src/filterdiff.c b/src/filterdiff.c index a6087ea4..b245cb4c 100644 --- a/src/filterdiff.c +++ b/src/filterdiff.c @@ -1227,6 +1227,9 @@ static int filterdiff (FILE *f, const char *patchname) else if (!strncmp (line, "Binary files ", 13)) { /* Binary files line - this is diff content, break to process */ break; + } else if (!strncmp (line, "GIT binary patch", 16)) { + /* GIT binary patch line - this is diff content, break to process */ + break; } else if (strncmp (line, "old mode ", 9) && strncmp (line, "new mode ", 9) && strncmp (line, "deleted file mode ", 18) && diff --git a/tests/git-error-handling/run-test b/tests/git-error-handling/run-test index 0fbe3bfb..484a7212 100755 --- a/tests/git-error-handling/run-test +++ b/tests/git-error-handling/run-test @@ -130,6 +130,7 @@ ${LSDIFF} mixed-binary.patch 2>errors9 >result9 || exit 1 cat << EOF | cmp - result9 || exit 1 a/file1.bin +a/file2.dat EOF # Test 10: Empty git diff (just headers, no content)