Skip to content

Commit

Permalink
test overlapping ignore patterns
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Michael J Gruber authored and Junio C Hamano committed Dec 18, 2008
1 parent c0ceb2c commit 32738ed
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions t/t3001-ls-files-others-exclude.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 32738ed

Please sign in to comment.