author | Junio C Hamano <gitster@pobox.com> | |
Fri, 5 Nov 2010 18:39:08 +0000 (11:39 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Fri, 5 Nov 2010 18:39:08 +0000 (11:39 -0700) |
* cb/diff-fname-optim:
diff: avoid repeated scanning while looking for funcname
do not search functions for patch ID
add rebase patch id tests
diff: avoid repeated scanning while looking for funcname
do not search functions for patch ID
add rebase patch id tests
1 | 2 | |||
---|---|---|---|---|
diff.c | patch | | diff1 | | diff2 | | blob | history |
diff --cc diff.c
index 154d3acd01e649b638dd0b960e5bae9f3491d663,6dbb4b40fa7eccff62129368ea1a59f9b29fdb83..7ab9b5d853e376e6f81517d0d3129ce106351e3c
+++ b/diff.c
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;
+ xecfg.flags = 0;
xdi_diff_outf(&mf1, &mf2, patch_id_consume, &data,
&xpp, &xecfg);
}