@matheusbsbs / matheus-bagliano / commits / 32738edfca
Fork 0

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>

Michael J Gruber committed Dec 18, 2008 at 18:11 UTC 32738edfca29d819939196c65aecc1979ed23aa9
1 file changed +6
t/t3001-ls-files-others-exclude.sh
+6
@@ -140,4 +140,10 @@ test_expect_success 'trailing slash in exclude forces directory match (2)' '
140
141 '
142
143 +test_expect_success 'negated exclude matches can override previous ones' '
144 +
145 + git ls-files --others --exclude="a.*" --exclude="!a.1" >output &&
146 + grep "^a.1" output
147 +'
148 +
149 test_done