summaryrefslogtreecommitdiff
path: root/t/t3700-add.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-12-22 20:26:30 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-12-22 20:26:30 (GMT)
commit017820702142458b8d8ae1d1af1362e48b696377 (patch)
tree33cf69eb224e2ace5c488a3556463e788af702d0 /t/t3700-add.sh
parent3cdb0cb610121731c510088ecbc21959fa1e27e3 (diff)
parent1d31e5a2cd9f90799330d5095783e7b972357f0e (diff)
downloadgit-017820702142458b8d8ae1d1af1362e48b696377.zip
git-017820702142458b8d8ae1d1af1362e48b696377.tar.gz
git-017820702142458b8d8ae1d1af1362e48b696377.tar.bz2
Merge branch 'mg/add-ignore-errors'
"git add --ignore-errors ..." did not ignore an error to give a file that did not exist. * mg/add-ignore-errors: add: ignore only ignored files
Diffstat (limited to 't/t3700-add.sh')
-rwxr-xr-xt/t3700-add.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/t/t3700-add.sh b/t/t3700-add.sh
index fe274e2..f7ff1f5 100755
--- a/t/t3700-add.sh
+++ b/t/t3700-add.sh
@@ -91,6 +91,13 @@ test_expect_success 'error out when attempting to add ignored ones without -f' '
! (git ls-files | grep "\\.ig")
'
+test_expect_success 'error out when attempting to add ignored ones but add others' '
+ touch a.if &&
+ test_must_fail git add a.?? &&
+ ! (git ls-files | grep "\\.ig") &&
+ (git ls-files | grep a.if)
+'
+
test_expect_success 'add ignored ones with -f' '
git add -f a.?? &&
git ls-files --error-unmatch a.ig
@@ -311,7 +318,6 @@ cat >expect.err <<\EOF
The following paths are ignored by one of your .gitignore files:
ignored-file
Use -f if you really want to add them.
-fatal: no files added
EOF
cat >expect.out <<\EOF
add 'track-this'