mirror of
https://git.proxmox.com/git/libgit2
synced 2025-08-12 10:01:10 +00:00
Fix 'If we're dealing with a directory' check
This commit is contained in:
parent
6b36945d7e
commit
6d0defe31c
@ -97,7 +97,7 @@ static int does_negate_rule(int *out, git_vector *rules, git_attr_fnmatch *match
|
|||||||
if (rule->containing_dir) {
|
if (rule->containing_dir) {
|
||||||
git_buf_puts(&buf, rule->containing_dir);
|
git_buf_puts(&buf, rule->containing_dir);
|
||||||
}
|
}
|
||||||
if (!strchr(rule->pattern, '*'))
|
if (rule->flags & GIT_ATTR_FNMATCH_LEADINGDIR && !(rule->flags & GIT_ATTR_FNMATCH_NEGATIVE))
|
||||||
error = git_buf_printf(&buf, "%s/*", rule->pattern);
|
error = git_buf_printf(&buf, "%s/*", rule->pattern);
|
||||||
else
|
else
|
||||||
error = git_buf_puts(&buf, rule->pattern);
|
error = git_buf_puts(&buf, rule->pattern);
|
||||||
|
Loading…
Reference in New Issue
Block a user