From 4727f640036fbdad414bdcbe31d08f6a8fd70923 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Sun, 19 Jun 2005 13:14:05 -0700 Subject: [PATCH] Make -C less eager. Like diff-tree, this patch makes -C option for diff-* brothers to use only pre-image of modified files as rename/copy detection by default. Give --find-copies-harder to use unmodified files to find copies from as well. This also fixes "diff-files -C" problem earlier noticed by Linus. It was feeding the null sha1 even when the file in the work tree was known to match what is in the index file. This resulted in diff-files showing everything in the project. Signed-off-by: Junio C Hamano Signed-off-by: Linus Torvalds --- t/t4003-diff-rename-1.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 't/t4003-diff-rename-1.sh') diff --git a/t/t4003-diff-rename-1.sh b/t/t4003-diff-rename-1.sh index 63a3103b4..8e3091abb 100644 --- a/t/t4003-diff-rename-1.sh +++ b/t/t4003-diff-rename-1.sh @@ -108,7 +108,8 @@ test_expect_success \ # the diff-core. Unchanged rezrov, although being fed to # git-diff-cache as well, should not be mentioned. -GIT_DIFF_OPTS=--unified=0 git-diff-cache -C -p $tree >current +GIT_DIFF_OPTS=--unified=0 \ + git-diff-cache -C --find-copies-harder -p $tree >current cat >expected <<\EOF diff --git a/COPYING b/COPYING.1 copy from COPYING -- cgit v1.2.1