diff options
author | Junio C Hamano <gitster@pobox.com> | 2009-01-23 19:06:38 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-01-23 19:06:38 -0800 |
commit | 692be9f365be09160f8baa1d6d521d0f65ec4cf9 (patch) | |
tree | 3b02f8015c0638ec3d4de4859f2fb7311f2f7a7f /t | |
parent | Merge branch 'tr/maint-no-index-fixes' into maint (diff) | |
parent | unpack-trees: remove redundant path search in verify_absent (diff) | |
download | tgif-692be9f365be09160f8baa1d6d521d0f65ec4cf9.tar.xz |
Merge branch 'cb/maint-unpack-trees-absense' into maint
* cb/maint-unpack-trees-absense:
unpack-trees: remove redundant path search in verify_absent
unpack-trees: fix path search bug in verify_absent
unpack-trees: handle failure in verify_absent
Diffstat (limited to 't')
-rwxr-xr-x | t/t1001-read-tree-m-2way.sh | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/t/t1001-read-tree-m-2way.sh b/t/t1001-read-tree-m-2way.sh index 4b44e131b2..271bc4e17f 100755 --- a/t/t1001-read-tree-m-2way.sh +++ b/t/t1001-read-tree-m-2way.sh @@ -341,4 +341,55 @@ test_expect_success \ check_cache_at DF/DF dirty && :' +test_expect_success \ + 'a/b (untracked) vs a case setup.' \ + 'rm -f .git/index && + : >a && + git update-index --add a && + treeM=`git write-tree` && + echo treeM $treeM && + git ls-tree $treeM && + git ls-files --stage >treeM.out && + + rm -f a && + git update-index --remove a && + mkdir a && + : >a/b && + treeH=`git write-tree` && + echo treeH $treeH && + git ls-tree $treeH' + +test_expect_success \ + 'a/b (untracked) vs a, plus c/d case test.' \ + '! git read-tree -u -m "$treeH" "$treeM" && + git ls-files --stage && + test -f a/b' + +test_expect_success \ + 'a/b vs a, plus c/d case setup.' \ + 'rm -f .git/index && + rm -fr a && + : >a && + mkdir c && + : >c/d && + git update-index --add a c/d && + treeM=`git write-tree` && + echo treeM $treeM && + git ls-tree $treeM && + git ls-files --stage >treeM.out && + + rm -f a && + mkdir a + : >a/b && + git update-index --add --remove a a/b && + treeH=`git write-tree` && + echo treeH $treeH && + git ls-tree $treeH' + +test_expect_success \ + 'a/b vs a, plus c/d case test.' \ + 'git read-tree -u -m "$treeH" "$treeM" && + git ls-files --stage | tee >treeMcheck.out && + test_cmp treeM.out treeMcheck.out' + test_done |