Jeff King <peff@xxxxxxxx> writes: > @@ -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? -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html