summaryrefslogtreecommitdiff
path: root/setup.c
diff options
context:
space:
mode:
Diffstat (limited to 'setup.c')
-rw-r--r--setup.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/setup.c b/setup.c
index e9d3f5aab6..dda67d268d 100644
--- a/setup.c
+++ b/setup.c
@@ -251,7 +251,7 @@ const char *setup_git_directory_gently(int *nongit_ok)
offset++;
cwd[len++] = '/';
cwd[len] = 0;
- inside_git_dir = !strncmp(cwd + offset, ".git/", 5);
+ inside_git_dir = !prefixcmp(cwd + offset, ".git/");
return cwd + offset;
}