Pretty serious anchoring bug causes spurious matches
.gitignore contents: build
<path to project>/abcbuild matches even though such a pattern is supposed to only match if the file name is exactly that.
I'll be happy to accept a PR that fixes this.
Posted the PR although I don't know the spec well enough. https://github.com/snark/ignorance/issues/1 has a different proposal for anchoring. Can you let me know which solution is correct?
I'm afraid I don't know which solution is correct. I also don't have time to look into it. You mention in your PR that you are not entirely sure it is the right behavior. I would love to have a more confident opinion, by either you or others, that your proposed change really conforms to the spec.
I believe a ran into this same issue:
# .gitignore
build/
will match both build/ directory and sdist_build.py.
For reference, an alternative project that works for python <3.6 is https://pypi.org/project/pathspec/.
Hello Is this issue fixed in release 0.1.2 ?
I have a issue like this: A project managed by git. And the gitignore config like this: '*/build'. And the file abs path like: ./B/build/a.java is not ignored!
This was probably resolved by #58.