diff options
author | Junio C Hamano <gitster@pobox.com> | 2010-08-31 16:24:48 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-08-31 16:24:48 -0700 |
commit | 7cc1e385a0b0caa27de714a6c7242b14bf023a65 (patch) | |
tree | d946391be671555b2ce561fada2d4d1bb3c6c93c | |
parent | 0c1c798f20bb9956312247e091b23ba2e7baf7b4 (diff) | |
parent | 34597c1f5a77c710dae33092cb8a7cb01c6b21c1 (diff) | |
download | git-7cc1e385a0b0caa27de714a6c7242b14bf023a65.tar.gz git-7cc1e385a0b0caa27de714a6c7242b14bf023a65.tar.xz |
Merge branch 'cb/binary-patch-id'
* cb/binary-patch-id:
hash binary sha1 into patch id
-rw-r--r-- | diff.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -3853,6 +3853,13 @@ static int diff_get_patch_id(struct diff_options *options, unsigned char *sha1) len2, p->two->path); git_SHA1_Update(&ctx, buffer, len1); + if (diff_filespec_is_binary(p->one) || + diff_filespec_is_binary(p->two)) { + git_SHA1_Update(&ctx, sha1_to_hex(p->one->sha1), 40); + git_SHA1_Update(&ctx, sha1_to_hex(p->two->sha1), 40); + continue; + } + xpp.flags = 0; xecfg.ctxlen = 3; xecfg.flags = XDL_EMIT_FUNCNAMES; |