MightyCreak / diffuse

Diffuse is a graphical tool for comparing and merging text files. It can retrieve files for comparison from Bazaar, CVS, Darcs, Git, Mercurial, Monotone, RCS, Subversion, and SVK repositories.
http://mightycreak.github.io/diffuse/
GNU General Public License v2.0
265 stars 45 forks source link

Ignore changed binary files in Git repositories #95

Closed yuriiz closed 8 months ago

MightyCreak commented 3 years ago

Thanks for your contribution!

It's possible that, even though we can't diff binary files, users might still want them to appear in the list of tabs, just to know they've been modified. So I'll need to check that locally, and I'll get back to you.

glasswings commented 9 months ago

I'm dropping in with peer-to-peer commentary if that's okay.

The PR is based on v0.6.0-26-g761a0a1 and doesn't apply cleanly to main. This is because of code reorganization near v0.6.0-32-gfd3c2bf (Start modularizing the code). It might be possible to get a clean merge by renaming before merge, but I would rather rebase.

The base version v0.6.0-26-g761a0a1 needed a tiny patch to build The same patch applies to to the PR tip.

Diffuse interprets a png as latin-1 and it sure is ugly. Any edits made and saved this way will be garbage. I'd rather not have that behavior in my personal build.

There's a usability issue: I created a new repository, made a merge conflict in a png, and ran git diff --numstat. (git 2.39.2) The output shows 0 instead of -. Git is weird here - imo it doesn't do what the manpage says it should. The effect is that this PR doesn't notice that the png is a binary file.

I think a better approach is to parse git ls-files --stage --eol instead, which does automatically identify png as a non-text format.

Conclusion: I can understand (and won't be disrupted by) closing this PR as abandoned. But I have the same itch to scratch and will work on it.