Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH] attr: don't confuse prefixes with leading directories

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:52:46

Jeff King [off-list ref] writes:
quoted hunk
diff --git a/attr.c b/attr.c
index 76b079f..fa975da 100644
--- a/attr.c
+++ b/attr.c
@@ -582,7 +582,8 @@ static void prepare_attr_stack(const char *path)
 
 		elem = attr_stack;
 		if (namelen <= dirlen &&
-		    !strncmp(elem->origin, path, namelen))
+		    !strncmp(elem->origin, path, namelen) &&
+		    (!namelen || path[namelen] == '/'))
 			break;
Thanks for the fix; I was looking at path_matches() and wondering about
the same thing.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help