-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pattern matching is too greedy #9
Comments
I found the same thing. This logic is incorrect:
It should be something like (but write tests to verify since I only tested my use case):
I found it through doing something like and testing node_modules/backbone/package.json:
This library will list things in the backbone directory, but git would ignore the files based on the first condition before getting to the second one. |
I tried to port gitignore tests from libgit2 to to this module and stopped. The problem is that actually implementing gitignore to be fully compliant is very complex. I've moved over to using the following module: https://github.com/kaelzhang/node-ignore |
I would think that
package.json
should still be accepted since git CLI would not ignore that file with that.gitignore
.The text was updated successfully, but these errors were encountered: