Merge branch 'cb/binary-patch-id'
* cb/binary-patch-id: hash binary sha1 into patch id
This commit is contained in:
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);
|
len2, p->two->path);
|
||||||
git_SHA1_Update(&ctx, buffer, len1);
|
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;
|
xpp.flags = 0;
|
||||||
xecfg.ctxlen = 3;
|
xecfg.ctxlen = 3;
|
||||||
xecfg.flags = XDL_EMIT_FUNCNAMES;
|
xecfg.flags = XDL_EMIT_FUNCNAMES;
|
||||||
|
|||||||
Reference in New Issue
Block a user