aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-03-28 21:21:42 -0700
committerJunio C Hamano <gitster@pobox.com>2010-03-28 21:21:42 -0700
commitcc64c6970a0d50ecb75ba902d406bac7ea461f97 (patch)
tree9b13255ef2b1e46062b90f0bc42bbacc0b56f201 /t
parent4c367c6ae978ef18477fba6b00458c32f1d49d0d (diff)
parent1e7ef746d3a635742690817fefe00b66a044dfe5 (diff)
downloadgit-cc64c6970a0d50ecb75ba902d406bac7ea461f97.tar.gz
git-cc64c6970a0d50ecb75ba902d406bac7ea461f97.tar.xz
Merge branch 'cp/add-u-pathspec' into maint
* cp/add-u-pathspec: test for add with non-existent pathspec git add -u: die on unmatched pathspec
Diffstat (limited to 't')
-rwxr-xr-xt/t2200-add-update.sh5
-rwxr-xr-xt/t3700-add.sh5
2 files changed, 10 insertions, 0 deletions
diff --git a/t/t2200-add-update.sh b/t/t2200-add-update.sh
index 912075063..2ad2819a3 100755
--- a/t/t2200-add-update.sh
+++ b/t/t2200-add-update.sh
@@ -176,4 +176,9 @@ test_expect_success 'add -u resolves unmerged paths' '
'
+test_expect_success '"add -u non-existent" should fail' '
+ test_must_fail git add -u non-existent &&
+ ! (git ls-files | grep "non-existent")
+'
+
test_done
diff --git a/t/t3700-add.sh b/t/t3700-add.sh
index 85eb0fbf9..525c9a8fd 100755
--- a/t/t3700-add.sh
+++ b/t/t3700-add.sh
@@ -255,4 +255,9 @@ test_expect_success 'git add to resolve conflicts on otherwise ignored path' '
git add track-this
'
+test_expect_success '"add non-existent" should fail' '
+ test_must_fail git add non-existent &&
+ ! (git ls-files | grep "non-existent")
+'
+
test_done