summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2015-01-12 14:02:19 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2015-01-12 14:02:19 -0800
commitd0879b33a6c34285a870e351e8eaee5cd695e92d (patch)
tree17df01c0a750aabdc9ec86e40921a2c37597b48b /t
parentMerge branch 'mh/find-uniq-abbrev' into maint (diff)
parentadd: ignore only ignored files (diff)
downloadtgif-d0879b33a6c34285a870e351e8eaee5cd695e92d.tar.xz
Merge branch 'mg/add-ignore-errors' into maint
* mg/add-ignore-errors: add: ignore only ignored files
Diffstat (limited to 't')
-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 fe274e2fb1..f7ff1f555d 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'