Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
Merge branch 'cb/binary-patch-id'
author
Junio C Hamano
<gitster@pobox.com>
Tue, 31 Aug 2010 23:24:48 +0000
(16:24 -0700)
committer
Junio C Hamano
<gitster@pobox.com>
Tue, 31 Aug 2010 23:24:48 +0000
(16:24 -0700)
* cb/binary-patch-id:
hash binary sha1 into patch id
diff.c
patch
|
blob
|
history
raw
(from parent 1:
0c1c798
)
diff --git
a/diff.c
b/diff.c
index 6fb97d4623192167e9b9f83b02dfe9250f028c0a..144f2aaba85682ef44d307d2b015fd918336879b 100644
(file)
--- a/
diff.c
+++ b/
diff.c
@@
-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;