summaryrefslogtreecommitdiff
path: root/src/attr_file.c
diff options
context:
space:
mode:
authorRussell Belfer <rb@github.com>2014-08-08 15:18:40 -0700
committerRussell Belfer <rb@github.com>2014-08-08 15:19:15 -0700
commita0cacc82d5bd3ba6b0240f5e3a7e926e977d3535 (patch)
tree7f31f99e37a750ff23c0ee44f73c5b39b90fa912 /src/attr_file.c
parentaa5cdf63bfa4581110fb37cdb2ccffc021eb78fa (diff)
downloadlibgit2-a0cacc82d5bd3ba6b0240f5e3a7e926e977d3535.tar.gz
For negative matches, always use leading dir match
Diffstat (limited to 'src/attr_file.c')
-rw-r--r--src/attr_file.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/attr_file.c b/src/attr_file.c
index 2f0953736..07ffacbaf 100644
--- a/src/attr_file.c
+++ b/src/attr_file.c
@@ -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++;
}