From 32738edfca29d819939196c65aecc1979ed23aa9 Mon Sep 17 00:00:00 2001 From: Michael J Gruber Date: Thu, 18 Dec 2008 18:11:18 +0100 Subject: [PATCH] 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 Signed-off-by: Junio C Hamano --- t/t3001-ls-files-others-exclude.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/t/t3001-ls-files-others-exclude.sh b/t/t3001-ls-files-others-exclude.sh index 8666946b02..85aef12a11 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 -- 2.11.4.GIT