diff.c: do not use pathname comparison to tell renames

The final output from diff used to compare pathnames between
preimage and postimage to tell if the filepair is a rename/copy.
By explicitly marking the filepair created by diffcore_rename(),
the output routine, resolve_rename_copy(), does not have to do
so anymore.  This helps feeding a filepair that has different
pathnames in one and two elements to the diff machinery (most
notably, comparing two blobs).

Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
Junio C Hamano
2006-08-03 12:01:01 -07:00
parent c43ce6d603
commit ef677686ef
3 changed files with 4 additions and 6 deletions

View File

@ -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