From 1e7ef746d3a635742690817fefe00b66a044dfe5 Mon Sep 17 00:00:00 2001 From: Chris Packham Date: Tue, 9 Feb 2010 17:30:48 -0500 Subject: test for add with non-existent pathspec Add a test for 'git add -u pathspec' and 'git add pathspec' where pathspec does not exist. The expected result is that git add exits with an error message and an appropriate exit code. Signed-off-by: Chris Packham Signed-off-by: Junio C Hamano --- t/t2200-add-update.sh | 5 +++++ 1 file changed, 5 insertions(+) (limited to 't/t2200-add-update.sh') diff --git a/t/t2200-add-update.sh b/t/t2200-add-update.sh index 912075063b..2ad2819a34 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 -- cgit v1.2.3