Re: [PATCH] diff: add a config option to control orderfile
- From
Jonathan Nieder <jrnieder@gmail.com>
- Date
- Sep 24, 2013, 22:08 UTC
- Message-ID
- <20130924220849.GS9464@google.com>
- In-Reply-To
- <20130924215721.GA2072@redhat.com>
Michael S. Tsirkin wrote:
> On Tue, Sep 24, 2013 at 02:31:16PM -0700, Jonathan Nieder wrote: >> Michael S. Tsirkin wrote:
>>> Just making sure: is it correct that there's no requirement to use same >>> algorithm between patch-ids.c and builtin/patch-id.c ? >> >> I think so,
[...]
>> (They already differ in handling of binary files.) > > How do they differ btw?
"git diff" without --binary writes "Binary files a/foo and b/foo differ" and there is nothing for 'git patch-id' to consume for that file. With --binary, "git diff" produces entries in 'GIT binary patch' format which patch-id also skips.
'git cherry' and friends hash in the old and new versions of a binary file to avoid accidentally dropping changes (see v1.5.3-rc6~9 "Take binary diffs into accounts for 'git rebase', 2007-08-18, and v1.7.3-rc0~27^2 "hash binary sha1 into patch id", 2010-08-15).
Jonathan