https://bz.mercurial-scm.org/show_bug.cgi?id=5510
Bug ID: 5510 Summary: git diff mode ignores the -a (--text) flag, dumping out binaries instead Product: Mercurial Version: default branch Hardware: Macintosh OS: Mac OS Status: UNCONFIRMED Severity: bug Priority: wish Component: Mercurial Assignee: bugzi...@mercurial-scm.org Reporter: simon...@fb.com CC: mercurial-devel@mercurial-scm.org When you ask `hg diff` to show you a diff including a binary file, you get a "binary file changed" notice instead of a huge diff: $ hg init $ cp /bin/ls binary $ hg commit -Am init adding binary $ cp /bin/cp binary $ hg diff diff -r ab9f5960e788 binary Binary file binary has changed If you use the --text or -a flag, you get a full diff: $ hg diff -a diff -r ab9f5960e788 binary --- a/binary Mon Mar 20 13:52:33 2017 +0000 +++ b/binary Mon Mar 20 13:54:10 2017 +0000 @@ -1,52 +1,27 @@ <snip binary junk> However, if you use the --git flag, you get a git binary diff: $ hg diff --git | head -n4 diff --git a/binary b/binary index 1bf8f59e5d36939c9c89403c68707f4943ef2183..d432d4d9f4462bbd1038bf9649a2b871578e2d48 GIT binary patch literal 28912 I would expect you to need the -a flag, like git does: $ git diff index 1bf8f59..d533a9d 100755 Binary files a/binary and b/binary differ $ git diff -a diff --git a/binary b/binary index d533a9d..ece1e42 100755 --- a/binary +++ b/binary @@ -1,4024 +1,223 @@ <snip binary junk> -- You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel