Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/attr.c
diff options
context:
space:
mode:
Diffstat (limited to 'attr.c')
-rw-r--r--attr.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/attr.c b/attr.c
index f6b3f7e850..924b4408d5 100644
--- a/attr.c
+++ b/attr.c
@@ -573,7 +573,8 @@ static void prepare_attr_stack(const char *path, int dirlen)
elem = attr_stack;
if (namelen <= dirlen &&
- !strncmp(elem->origin, path, namelen))
+ !strncmp(elem->origin, path, namelen) &&
+ (!namelen || path[namelen] == '/'))
break;
debug_pop(elem);