Make git-branch a builtin
[gitweb.git] / t / t7001-mv.sh
index b7fcdb390c588545f2419ab3c825b924fbf96dd2..23a1eff3bba4505d449bd5fdffb3daf7f9b23ddf 100755 (executable)
@@ -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