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:
@ -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
|
||||
|
Reference in New Issue
Block a user