-
Notifications
You must be signed in to change notification settings - Fork 2.5k
git_pathspec_matches_path
not working with leading **/
on pattern
#6946
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
Comments
I believe that it does. The documentation you're referencing is vague, or perhaps simply wrong, compared to how git actually works.
|
See #6959 |
Interesting, maybe I'm confusing a path spec with a path pattern? I came about this since I found issues when processing some git attributes, but maybe those use a different logic then? (or is a bug in upstream git?) I can confirm that when the same is used on a |
Ah, indeed, there are some differences because of course there are. (For example, within the list of patterns in a gitignore or attributes file, you can negate patterns.) I don't think that we have a particularly self-contained mechanism like |
Yes, I think that's what I thought this function did too, but apparently I was mistaken. Should I close this and open a feature request to track this use case? |
Reproduction steps
Expected behavior
According to the git documentation:
Actual behavior
git_pathspec_matches_path
returns no matchesVersion of libgit2 (release number or SHA1)
Both
1.7.2
and latestmain
(0a6051c624fc3403e89a6a6679526126e587a401
)Operating system(s) tested
Linux (NixOS 24.05)
The text was updated successfully, but these errors were encountered: