summaryrefslogtreecommitdiff
path: root/t/t7001-mv.sh
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-10-01 22:22:07 -0700
committerJunio C Hamano <junkio@cox.net>2006-10-01 23:32:39 -0700
commit4fddf5798d8a0eb112c60a05272a2d9407eafc8f (patch)
treee42a21f3137d606e7c466bf16e8e78ef4403451b /t/t7001-mv.sh
parent82ca50556471eadfc3212cb478161c3da5c4d02a (diff)
downloadgit-4fddf5798d8a0eb112c60a05272a2d9407eafc8f.tar.gz
git-mv: invalidate the removed path properly in cache-tree
The command updated the cache without invalidating the cache tree entries while removing an existing entry. Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 't/t7001-mv.sh')
-rwxr-xr-xt/t7001-mv.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
index b7fcdb390c..23a1eff3bb 100755
--- a/t/t7001-mv.sh
+++ b/t/t7001-mv.sh
@@ -86,4 +86,23 @@ test_expect_success \
'move into "."' \
'git-mv path1/path2/ .'
+test_expect_success "Michael Cassar's test case" '
+ rm -fr .git papers partA &&
+ git init-db &&
+ mkdir -p papers/unsorted papers/all-papers partA &&
+ echo a > papers/unsorted/Thesis.pdf &&
+ echo b > partA/outline.txt &&
+ echo c > papers/unsorted/_another &&
+ git add papers partA &&
+ T1=`git write-tree` &&
+
+ git mv papers/unsorted/Thesis.pdf papers/all-papers/moo-blah.pdf &&
+
+ T=`git write-tree` &&
+ git ls-tree -r $T | grep partA/outline.txt || {
+ git ls-tree -r $T
+ (exit 1)
+ }
+'
+
test_done