Skip to content

Comments

Bugfix gitignore negated patterns#43

Open
sparr wants to merge 2 commits intoDTrejo:masterfrom
sparr:bugfix_gitignore_negated_patterns
Open

Bugfix gitignore negated patterns#43
sparr wants to merge 2 commits intoDTrejo:masterfrom
sparr:bugfix_gitignore_negated_patterns

Conversation

@sparr
Copy link

@sparr sparr commented Sep 26, 2024

The current handling of git ignore rules is incorrect for negated patterns.

foo*
!foobar

The above ignore rules should ignore foo* except for foobar and not ignore any other files. Currently the negated rule results in every other file being ignored (because every other file matches that rule according to minimatch).

This PR updates the ignore logic to handle negated rules correctly.

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.

1 participant