goelhardik / ignore

.gitignore based parser implemented in C# according to the .gitignore spec 2.29.2.
MIT License
50 stars 5 forks source link

Dotfiles are not handled correctly #40

Closed JKamsker closed 1 year ago

JKamsker commented 1 year ago
var ignore = new Ignore.Ignore();
ignore.Add(".*");

ignore.IsIgnored("/.dotfile").Dump(); // returns true
ignore.IsIgnored("/no.dotfile").Dump(); // returns true

The second one should not be ignored.

Tested using git. Gitignore:

.*

Created the files .dotfile and no.dotfile: no.dotfile shows up in the changes tab.

goelhardik commented 1 year ago

@JKamsker thanks for submitting the test PR. The version >= 0.1.49 should have the bug fix.