[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:
Junio C Hamano
2005-05-21 02:42:35 -07:00
committed by Linus Torvalds
parent 52e9578985
commit c3e7fbcbd0
3 changed files with 40 additions and 3 deletions

View File

@ -126,7 +126,7 @@ int main(int argc, char **argv)
continue;
}
changed = ce_match_stat(ce, &st);
if (!changed)
if (!changed && detect_rename < 2)
continue;
oldmode = ntohl(ce->ce_mode);