Merge branch 'cb/binary-patch-id'
* cb/binary-patch-id: hash binary sha1 into patch id
This commit is contained in:
commit
7cc1e385a0
7
diff.c
7
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;
|
||||
|
Loading…
Reference in New Issue
Block a user