You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Since version 0.4.4, lsdiff and filterdiff have been incorrectly counting binary changes. #157
changed the title [-]in version 0.4.4 lsdiff and filterdiff are counting binary changes[/-][+]Since version 0.4.4, lsdiff and filterdiff have been incorrectly counting binary changes.[/+]on Feb 23, 2026
I’ve been testing this all day and did not find any issues. It is fixed now.
However, I realized that in version 0.4.3 binary files did not appear in the listings. This is a compatibility break, and it may not even be useful to include binary files in the output.
I think we should at least provide an option in filterdiff to explicitly include or exclude binary files from the listings.
How about if we introduce a new parameter for filterdiff? --git-extended-diffs=exclude|include which would default to exclude for 0.4.x but include for 0.5.x (on master)? Some of these changes were made to fix reported bugs about git extended diffs being ignored.
I’ve been checking, and it does seem that binary files only appear in git diff output. Therefore, the option name git-extended-diffs is correct, and I think your suggestion makes sense.
Activity
sergiomb2 commentedon Feb 10, 2026
to exemplify
git diff a54b9aa..b656bed | lsdiff -N
[-]in version 0.4.4 lsdiff and filterdiff are counting binary changes[/-][+]Since version 0.4.4, lsdiff and filterdiff have been incorrectly counting binary changes.[/+]sergiomb2 commentedon Feb 23, 2026
I bisected the commits and the problem starts at commit bfab1d2
.
sergiomb2 commentedon Feb 23, 2026
I just noticed that the error occurs when a binary file is created or deleted.
The bigger problem is that these messages are not being filtered.
For example:
git diff a54b9aa..b656bed | patchview -F1 , print the file 1 and this:
Binary files /dev/null and b/ConnectTimeoutTest.class differ
Binary files a/MessageContentFactory copy.class and /dev/null differ
Binary files a/MessageContentFactory1.class and /dev/null differ
Binary files a/MessageContentFactory_.class and /dev/null differ
Binary files /dev/null and b/img/fdgb.png differ
Binary files /dev/null and b/img/inacep.png differ
Binary files /dev/null and b/img/inm.png differ
Add test cases for binary file handling issues
Fix binary file numbering in lsdiff (issue #157)
Fix binary file filtering with -F option (issue #157)
Merge pull request #162 from twaugh/issue-157
Update NEWS for issue #157 fixes
twaugh commentedon Feb 23, 2026
Fixed via #162. Thanks for the analysis!
sergiomb2 commentedon Feb 24, 2026
I’ve been testing this all day and did not find any issues. It is fixed now.
However, I realized that in version 0.4.3 binary files did not appear in the listings. This is a compatibility break, and it may not even be useful to include binary files in the output.
I think we should at least provide an option in filterdiff to explicitly include or exclude binary files from the listings.
twaugh commentedon Feb 24, 2026
How about if we introduce a new parameter for filterdiff?
--git-extended-diffs=exclude|includewhich would default toexcludefor 0.4.x butincludefor 0.5.x (on master)? Some of these changes were made to fix reported bugs about git extended diffs being ignored.sergiomb2 commentedon Feb 24, 2026
I’ve been checking, and it does seem that binary files only appear in git diff output. Therefore, the option name git-extended-diffs is correct, and I think your suggestion makes sense.
Add --git-extended-diffs option to restore 0.4.3 compatibility
twaugh commentedon Feb 25, 2026
@sergiomb2 see what you think of this PR:
Add --git-extended-diffs option to restore 0.4.3 compatibility
twaugh commentedon Feb 26, 2026
Close via #164