- Notifications
You must be signed in to change notification settings - Fork2.5k
Description
I noticed that the gitignore patternfoo**/bar behaves differently between libgit2 and Git. When.gitignore containsfoo**/bar,
- Git ignore a file named
foobar, while - libgit2 doesnot ignore
foobar.
I tested libgit2 using the following code:
https://github.com/tomokinakamaru/libgit2/blob/da0c65d8977e7dcd29928ff8ac39ba58d4e7e45d/tests/libgit2/ignore/path.c#L35-L40 -> Test failure
https://github.com/tomokinakamaru/libgit2/blob/da0c65d8977e7dcd29928ff8ac39ba58d4e7e45d/tests/libgit2/ignore/status.c#L94-L102 -> Test failure
Git's behavior is non-intuitive in my personal opinion :( But I founda real-world example of this pattern, which suggests that this difference could have practical implications given the wide use of libgit2.
Is this difference intentional or a known issue? Please let me know if I am misunderstanding something here, and thank you for maintaining this nice library!