aboutsummaryrefslogtreecommitdiff
path: root/diffcore-rename.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-08-03 12:01:01 -0700
committerJunio C Hamano <junkio@cox.net>2006-08-03 14:41:53 -0700
commitef677686efe1868432d3cc9d4c41a93b44f3def8 (patch)
treef4ba8f6c1117bd4a9c62257150ad0bb28d413e85 /diffcore-rename.c
parentc43ce6d603c68f716f83f1da68cc4692202085e0 (diff)
downloadgit-ef677686efe1868432d3cc9d4c41a93b44f3def8.tar.gz
git-ef677686efe1868432d3cc9d4c41a93b44f3def8.tar.xz
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>
Diffstat (limited to 'diffcore-rename.c')
-rw-r--r--diffcore-rename.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/diffcore-rename.c b/diffcore-rename.c
index 1de8d3250..0ec488a90 100644
--- a/diffcore-rename.c
+++ b/diffcore-rename.c
@@ -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