-
-
Notifications
You must be signed in to change notification settings - Fork 47
Description
I've noticed that the following five gitignore patterns are interpreted differently between node-ignore and Git:
| pattern | path | node-ignore | Git |
|---|---|---|---|
foo**/bar |
foobar |
Tracked 1 | Ignored |
bar/ |
foo/bar/ |
Tracked 2 | Ignored |
[!] |
! |
Ignored 3 | Tracked |
\\* |
\\ |
Tracked 4 | Ignored |
\* |
\ |
Ignored 5 | Tracked |
In my opinion, Git's interpretations are somewhat confusing, but given the wide use of node-ignore, I wanted to report these differences for clarification. I would be happy if the node-ignore follows Git perfectly, but I understand if it behaves differently against these edge cases.
Are these differences expected or known issues?
Footnotes
-
https://github.com/tomokinakamaru/node-ignore/blob/872e34fe0cf276571085a565e9bacfae0a30c19c/test/fixtures/cases.js#L34-L42 ↩
-
https://github.com/tomokinakamaru/node-ignore/blob/872e34fe0cf276571085a565e9bacfae0a30c19c/test/fixtures/cases.js#L43-L51 ↩
-
https://github.com/tomokinakamaru/node-ignore/blob/872e34fe0cf276571085a565e9bacfae0a30c19c/test/fixtures/cases.js#L52-L60 ↩
-
https://github.com/tomokinakamaru/node-ignore/blob/872e34fe0cf276571085a565e9bacfae0a30c19c/test/fixtures/cases.js#L61-L69 ↩
-
https://github.com/tomokinakamaru/node-ignore/blob/872e34fe0cf276571085a565e9bacfae0a30c19c/test/fixtures/cases.js#L70-L78 ↩