[PATCH] Diff overhaul, adding the other half of copy detection.
This patch extends diff-cache and diff-files to report the unmodified files to diff-core as well when -C (copy detection) is in effect, so that the unmodified files can also be used as the source candidates. The existing test t4003 has been extended to cover this case. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:

committed by
Linus Torvalds

parent
52e9578985
commit
c3e7fbcbd0
@ -71,7 +71,8 @@ static int show_modified(struct cache_entry *old,
|
||||
}
|
||||
|
||||
oldmode = old->ce_mode;
|
||||
if (mode == oldmode && !memcmp(sha1, old->sha1, 20))
|
||||
if (mode == oldmode && !memcmp(sha1, old->sha1, 20) &&
|
||||
detect_rename < 2)
|
||||
return 0;
|
||||
|
||||
mode = ntohl(mode);
|
||||
|
Reference in New Issue
Block a user