Thread (2 messages) flat view 2 messages, 2 authors, 2016-06-15

Re: Alternates corruption issue

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

Jeff King [off-list ref] writes:
quoted hunk
@@ -324,8 +324,11 @@ const char *enter_repo(const char *path, int strict)
 			return NULL;
 		len = strlen(used_path);
 		for (i = 0; suffix[i]; i++) {
+			struct stat st;
 			strcpy(used_path + len, suffix[i]);
-			if (!access(used_path, F_OK)) {
+			if (!stat(used_path, &st) &&
+			    (S_ISREG(st.st_mode) ||
+			    (S_ISDIR(st.st_mode) && is_git_directory(used_path)))) {
Hmm, how would this change interact with
 				strcat(validated_path, suffix[i]);
 				break;
 			}
	gitfile = read_gitfile(used_path);

that appear after the context in the patch?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help