-
Notifications
You must be signed in to change notification settings - Fork 46
Description
I've noticed that the following four gitignore patterns are interpreted differently between python-pathspec and Git:
| pattern | path | python-pathspec | Git |
|---|---|---|---|
foo**/bar |
foobar |
Tracked 1 | Ignored |
foo |
foo |
Tracked 2 | Ignored |
[ |
[ |
Ignored 3 | Tracked |
[!] |
[!] |
Ignored 4 | Tracked |
In my opinion, Git's behavior here is somewhat confusing, but given the wide use of python-pathspec5, I wanted to report these differences for clarification. Ideally, I would be happy if the python-pathspec 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/python-pathspec/blob/e2677495f64a5b19249184b9f1027adac45cd8b8/tests/test_03_pathspec.py#L57-L63 -> test failure ↩
-
https://github.com/tomokinakamaru/python-pathspec/blob/e2677495f64a5b19249184b9f1027adac45cd8b8/tests/test_03_pathspec.py#L65-L71 -> test failure ↩
-
https://github.com/tomokinakamaru/python-pathspec/blob/e2677495f64a5b19249184b9f1027adac45cd8b8/tests/test_03_pathspec.py#L73-L79 -> test failure ↩
-
https://github.com/tomokinakamaru/python-pathspec/blob/e2677495f64a5b19249184b9f1027adac45cd8b8/tests/test_03_pathspec.py#L81-L87 -> test failure ↩
-
I am concerned that cloud-related tools such as awsebcli, which rely on python-pathspec to determine upload inclusion, could inadvertently upload unintended files to a server. ↩