summaryrefslogtreecommitdiff
path: root/src/attr_file.c
diff options
context:
space:
mode:
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 8619647a3..6042da2ba 100644
--- a/src/attr_file.c
+++ b/src/attr_file.c
@@ -604,7 +604,8 @@ int git_attr_fnmatch__parse(
if (*scan == '/') {
spec->flags = spec->flags | GIT_ATTR_FNMATCH_FULLPATH;
slash_count++;
- if (pattern == scan)
+
+ if (slash_count == 1 && pattern == scan)
pattern++;
}
/* remember if we see an unescaped wildcard in pattern */