summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-11-15 12:05:01 +0900
committerJunio C Hamano <gitster@pobox.com>2017-11-15 12:05:01 +0900
commit16f8cd1fba98fc39ac32c7063e38f9c8470f643a (patch)
treea22490ffa5dff485e87b366a60e77eb0cbeea13b
parent934e330c9d0d12f7a0dd82b9699456c891e4dd4a (diff)
parentfa4d8c783d780191d98fe1f68ad2dea2fe78d19c (diff)
downloadgit-16f8cd1fba98fc39ac32c7063e38f9c8470f643a.tar.gz
Merge branch 'js/early-config' into maint
Correct start-up sequence so that a repository could be placed immediately under the root directory again (which was broken at around Git 2.13). * js/early-config: setup: avoid double slashes when looking for HEAD
-rw-r--r--setup.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/setup.c b/setup.c
index 03f51e056c..94768512b7 100644
--- a/setup.c
+++ b/setup.c
@@ -312,7 +312,9 @@ int is_git_directory(const char *suspect)
size_t len;
/* Check worktree-related signatures */
- strbuf_addf(&path, "%s/HEAD", suspect);
+ strbuf_addstr(&path, suspect);
+ strbuf_complete(&path, '/');
+ strbuf_addstr(&path, "HEAD");
if (validate_headref(path.buf))
goto done;