[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>
diff --git a/diff-files.c b/diff-files.c
index d3b80a0..a3c523f 100644
--- a/diff-files.c
+++ b/diff-files.c
@@ -126,7 +126,7 @@
 			continue;
 		}
 		changed = ce_match_stat(ce, &st);
-		if (!changed)
+		if (!changed && detect_rename < 2)
 			continue;
 
 		oldmode = ntohl(ce->ce_mode);