Commit 6d0defe3 by Vsevolod Parfenov

Fix 'If we're dealing with a directory' check

parent 6b36945d
...@@ -97,7 +97,7 @@ static int does_negate_rule(int *out, git_vector *rules, git_attr_fnmatch *match ...@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment