diff options
author | Junio C Hamano <junkio@cox.net> | 2006-08-03 12:01:01 -0700 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-08-03 14:41:53 -0700 |
commit | ef677686efe1868432d3cc9d4c41a93b44f3def8 (patch) | |
tree | f4ba8f6c1117bd4a9c62257150ad0bb28d413e85 /diff.c | |
parent | c43ce6d603c68f716f83f1da68cc4692202085e0 (diff) | |
download | git-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 'diff.c')
-rw-r--r-- | diff.c | 6 |
1 files changed, 1 insertions, 5 deletions
@@ -1786,13 +1786,9 @@ struct diff_filepair *diff_queue(struct diff_queue_struct *queue, struct diff_filespec *one, struct diff_filespec *two) { - struct diff_filepair *dp = xmalloc(sizeof(*dp)); + struct diff_filepair *dp = xcalloc(1, sizeof(*dp)); dp->one = one; dp->two = two; - dp->score = 0; - dp->status = 0; - dp->source_stays = 0; - dp->broken_pair = 0; if (queue) diff_q(queue, dp); return dp; |