summaryrefslogtreecommitdiff
path: root/t/t3001-ls-files-others-exclude.sh
diff options
context:
space:
mode:
authorMichael J Gruber <git@drmicha.warpmail.net>2008-12-18 17:11:18 (GMT)
committerJunio C Hamano <gitster@pobox.com>2008-12-18 17:55:53 (GMT)
commit32738edfca29d819939196c65aecc1979ed23aa9 (patch)
tree6830cfe4afb90243c641c9efc34c9602bf7d7fd0 /t/t3001-ls-files-others-exclude.sh
parentc0ceb2c32d40c4bc835597105ba0c0fac4ae36ba (diff)
downloadgit-32738edfca29d819939196c65aecc1979ed23aa9.zip
git-32738edfca29d819939196c65aecc1979ed23aa9.tar.gz
git-32738edfca29d819939196c65aecc1979ed23aa9.tar.bz2
test overlapping ignore patterns
Add a test which checks that negated patterns such as "!foo.html" can override previous patterns such as "*.html". This is documented behaviour but had not been tested so far. Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t3001-ls-files-others-exclude.sh')
-rwxr-xr-xt/t3001-ls-files-others-exclude.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/t/t3001-ls-files-others-exclude.sh b/t/t3001-ls-files-others-exclude.sh
index 8666946..85aef12 100755
--- a/t/t3001-ls-files-others-exclude.sh
+++ b/t/t3001-ls-files-others-exclude.sh
@@ -140,4 +140,10 @@ test_expect_success 'trailing slash in exclude forces directory match (2)' '
'
+test_expect_success 'negated exclude matches can override previous ones' '
+
+ git ls-files --others --exclude="a.*" --exclude="!a.1" >output &&
+ grep "^a.1" output
+'
+
test_done