For negative matches, always use leading dir match

This commit is contained in:
Russell Belfer 2014-08-08 15:18:40 -07:00
parent aa5cdf63bf
commit a0cacc82d5

View File

@ -534,7 +534,8 @@ int git_attr_fnmatch__parse(
}
if (*pattern == '!' && (spec->flags & GIT_ATTR_FNMATCH_ALLOWNEG) != 0) {
spec->flags = spec->flags | GIT_ATTR_FNMATCH_NEGATIVE;
spec->flags = spec->flags |
GIT_ATTR_FNMATCH_NEGATIVE | GIT_ATTR_FNMATCH_LEADINGDIR;
pattern++;
}