diff options
author | Junio C Hamano <gitster@pobox.com> | 2009-01-13 23:09:20 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-01-13 23:09:20 -0800 |
commit | f39adc250c3e554c437d027bbc06309a78fd026d (patch) | |
tree | b4c26d99edf657b314dbf9177de2d6f3c73100f7 /t | |
parent | Merge branch 'mc/cd-p-pwd' (diff) | |
parent | unpack-trees: remove redundant path search in verify_absent (diff) | |
download | tgif-f39adc250c3e554c437d027bbc06309a78fd026d.tar.xz |
Merge branch 'cb/maint-unpack-trees-absense'
* 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 |