summaryrefslogtreecommitdiff
path: root/t/t4007-rename-3.sh
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2009-05-22 23:14:25 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2009-05-25 11:35:29 -0700
commita0919ced8a5efe938cf97c74a0f851cbbe00aaf6 (patch)
tree0e2fd9892101648379d29d4d59416a6b0b440ab5 /t/t4007-rename-3.sh
parentOptimize "diff-index --cached" using cache-tree (diff)
downloadtgif-a0919ced8a5efe938cf97c74a0f851cbbe00aaf6.tar.xz
Avoid "diff-index --cached" optimization under --find-copies-harder
When find-copies-harder is in effect, the diff frontends are expected to feed all paths, not just changed paths, to the diffcore, so that copy sources can be picked up. In such a case, not descending into subtrees using the cache-tree information is simply wrong. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4007-rename-3.sh')
-rwxr-xr-xt/t4007-rename-3.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/t/t4007-rename-3.sh b/t/t4007-rename-3.sh
index 25e7a83659..11502b7509 100755
--- a/t/t4007-rename-3.sh
+++ b/t/t4007-rename-3.sh
@@ -35,6 +35,11 @@ test_expect_success 'copy detection' '
compare_diff_raw current expected
'
+test_expect_success 'copy detection, cached' '
+ git diff-index -C --find-copies-harder --cached $tree >current &&
+ compare_diff_raw current expected
+'
+
# In the tree, there is only path0/COPYING. In the cache, path0 and
# path1 both have COPYING and the latter is a copy of path0/COPYING.
# However when we say we care only about path1, we should just see