aboutsummaryrefslogtreecommitdiff
path: root/t/t1001-read-tree-m-2way.sh
diff options
context:
space:
mode:
authorClemens Buchacher <drizzd@aon.at>2009-01-01 21:54:31 +0100
committerJunio C Hamano <gitster@pobox.com>2009-01-05 12:45:38 -0800
commit6b9315d5a14b4d1389cff347fcfcb86624bbf645 (patch)
tree8e61fe9ff6a9ad3ccc931f7a8c155aa878ce9048 /t/t1001-read-tree-m-2way.sh
parentea02eef096d4bfcbb83e76cfab0fcb42dbcad35e (diff)
downloadgit-6b9315d5a14b4d1389cff347fcfcb86624bbf645.tar.gz
git-6b9315d5a14b4d1389cff347fcfcb86624bbf645.tar.xz
unpack-trees: handle failure in verify_absent
Commit 203a2fe1 (Allow callers of unpack_trees() to handle failure) changed the "die on error" behavior to "return failure code". verify_absent did not handle errors returned by verify_clean_subdirectory, however. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t1001-read-tree-m-2way.sh')
-rwxr-xr-xt/t1001-read-tree-m-2way.sh24
1 files changed, 24 insertions, 0 deletions
diff --git a/t/t1001-read-tree-m-2way.sh b/t/t1001-read-tree-m-2way.sh
index 4b44e131b..7f6ab31c3 100755
--- a/t/t1001-read-tree-m-2way.sh
+++ b/t/t1001-read-tree-m-2way.sh
@@ -341,4 +341,28 @@ 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_done