mirror of
https://git.proxmox.com/git/libgit2
synced 2025-12-28 10:11:54 +00:00
Match against file with leading ! was too broad
This commit is contained in:
parent
4ba64794ae
commit
b7b77def93
@ -166,7 +166,8 @@ static int pathspec_match_one(
|
||||
if (result == FNM_NOMATCH &&
|
||||
(match->flags & GIT_ATTR_FNMATCH_NEGATIVE) != 0 &&
|
||||
*path == '!' &&
|
||||
ctxt->strncomp(path + 1, match->pattern, match->length) == 0)
|
||||
ctxt->strncomp(path + 1, match->pattern, match->length) == 0 &&
|
||||
(!path[match->length + 1] || path[match->length + 1] == '/'))
|
||||
return 1;
|
||||
|
||||
if (result == 0)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user