summaryrefslogtreecommitdiff
path: root/src/repository.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/repository.c')
-rw-r--r--src/repository.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/repository.c b/src/repository.c
index 7bdcefd40..5c4442360 100644
--- a/src/repository.c
+++ b/src/repository.c
@@ -410,7 +410,7 @@ static int find_repo(
break;
}
}
- else if (S_ISREG(st.st_mode)) {
+ else if (S_ISREG(st.st_mode) && git__suffixcmp(path.ptr, "/" DOT_GIT) == 0) {
error = read_gitfile(&repo_link, path.ptr);
if (error < 0)
break;