X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=diffcore-rename.c;h=ef239012b65c901bba5eef598f62679fd288106e;hb=ff989b8d466ee2ec42c69c02e6551add430b8497;hp=1de8d32502a77b641e004e9df9da3fcc188eef9c;hpb=24cf6e5847073d50390e0b7950e8e6b5a09103bc;p=git.git diff --git a/diffcore-rename.c b/diffcore-rename.c index 1de8d3250..ef239012b 100644 --- a/diffcore-rename.c +++ b/diffcore-rename.c @@ -101,7 +101,7 @@ static int is_exact_match(struct diff_filespec *src, int contents_too) { if (src->sha1_valid && dst->sha1_valid && - !memcmp(src->sha1, dst->sha1, 20)) + !hashcmp(src->sha1, dst->sha1)) return 1; if (!contents_too) return 0; @@ -205,6 +205,7 @@ static void record_rename_pair(int dst_index, int src_index, int score) fill_filespec(two, dst->sha1, dst->mode); dp = diff_queue(NULL, one, two); + dp->renamed_pair = 1; if (!strcmp(src->path, dst->path)) dp->score = rename_src[src_index].score; else