summaryrefslogtreecommitdiff
path: root/t/t3001-ls-files-others-exclude.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-06-03 19:58:56 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-06-03 19:58:56 (GMT)
commit3684101a654d5a7b598d9810df3b498f2a8928d0 (patch)
treed0b60e2ef0bc9279f77543cefe14688593b06f42 /t/t3001-ls-files-others-exclude.sh
parent1fee89cedd3f797ae792379475fab3e4183de17e (diff)
parentc3c327deeaf018e727a27f5ae88e140ff7a48595 (diff)
downloadgit-3684101a654d5a7b598d9810df3b498f2a8928d0.zip
git-3684101a654d5a7b598d9810df3b498f2a8928d0.tar.gz
git-3684101a654d5a7b598d9810df3b498f2a8928d0.tar.bz2
Merge branch 'kb/status-ignored-optim-2'
Fix 1.8.3 regressions in the .gitignore path exclusion logic. * kb/status-ignored-optim-2: dir.c: fix ignore processing within not-ignored directories
Diffstat (limited to 't/t3001-ls-files-others-exclude.sh')
-rwxr-xr-xt/t3001-ls-files-others-exclude.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/t/t3001-ls-files-others-exclude.sh b/t/t3001-ls-files-others-exclude.sh
index 4e3735f..f0421c0 100755
--- a/t/t3001-ls-files-others-exclude.sh
+++ b/t/t3001-ls-files-others-exclude.sh
@@ -175,6 +175,24 @@ test_expect_success 'negated exclude matches can override previous ones' '
grep "^a.1" output
'
+test_expect_success 'excluded directory overrides content patterns' '
+
+ git ls-files --others --exclude="one" --exclude="!one/a.1" >output &&
+ if grep "^one/a.1" output
+ then
+ false
+ fi
+'
+
+test_expect_success 'negated directory doesn'\''t affect content patterns' '
+
+ git ls-files --others --exclude="!one" --exclude="one/a.1" >output &&
+ if grep "^one/a.1" output
+ then
+ false
+ fi
+'
+
test_expect_success 'subdirectory ignore (setup)' '
mkdir -p top/l1/l2 &&
(