]> git.proxmox.com Git - libgit2.git/commitdiff
For negative matches, always use leading dir match
authorRussell Belfer <rb@github.com>
Fri, 8 Aug 2014 22:18:40 +0000 (15:18 -0700)
committerRussell Belfer <rb@github.com>
Fri, 8 Aug 2014 22:19:15 +0000 (15:19 -0700)
src/attr_file.c

index 2f0953736e397cebecd65dfec2ab2e18bb019265..07ffacbaffac9ad420d0bf89568f400c73c3e316 100644 (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++;
        }