diff options
Diffstat (limited to 'src/attr_file.c')
-rw-r--r-- | src/attr_file.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/attr_file.c b/src/attr_file.c index 6568313e5..b2edce90e 100644 --- a/src/attr_file.c +++ b/src/attr_file.c @@ -334,6 +334,10 @@ int git_attr_fnmatch__parse( spec->flags = spec->flags | GIT_ATTR_FNMATCH_FULLPATH; slash_count++; } + /* remember if we see an unescaped wildcard in pattern */ + else if ((*scan == '*' || *scan == '.' || *scan == '[') && + (scan == pattern || (*(scan - 1) != '\\'))) + spec->flags = spec->flags | GIT_ATTR_FNMATCH_HASWILD; } *base = scan; |