Skip to content

globset: fix matches_all false positives#3427

Open
tmccombs wants to merge 1 commit into
BurntSushi:masterfrom
tmccombs:matches-all-fix
Open

globset: fix matches_all false positives#3427
tmccombs wants to merge 1 commit into
BurntSushi:masterfrom
tmccombs:matches-all-fix

Conversation

@tmccombs

Copy link
Copy Markdown
Contributor

Make sure that we correctly check that all globs are matched, even if multiple globs use the same strategy.

Previously we only checked that all strategies matched, but didn't check with the strategies themselves.

This now adds a matches_all method to each strategy to recursively check all globs.

This is an alternative to #3302. It is a little more involved, but avoids allocating an array for tracking the number of matches.

Fixes: #3290

Make sure that we correctly check that all globs are matched, even if
multiple globs use the same strategy.

Previously we only checked that all strategies matched, but didn't check
with the strategies themselves.

This now adds a `matches_all` method to each strategy to recursively
check all globs.

This is an alternative to BurntSushi#3302. It is a little more involved, but
avoids allocating an array for tracking the number of matches.

Fixes: BurntSushi#3290
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GlobSet: matches_all returns true when multiple globs share the same match strategy

1 participant