summaryrefslogtreecommitdiff
path: root/setup.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-11-09 05:31:29 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-11-09 05:31:29 (GMT)
commit57dd3dd28724a150e6c6d4c1c8363e1efd49c197 (patch)
tree89d76fc06e9e2bc0e6f058f3784445a6d5e1b384 /setup.c
parent487a05f4653e26e8f75750547d91dd8c8166790e (diff)
parentfa4d8c783d780191d98fe1f68ad2dea2fe78d19c (diff)
downloadgit-57dd3dd28724a150e6c6d4c1c8363e1efd49c197.zip
git-57dd3dd28724a150e6c6d4c1c8363e1efd49c197.tar.gz
git-57dd3dd28724a150e6c6d4c1c8363e1efd49c197.tar.bz2
Merge branch 'js/early-config'
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
Diffstat (limited to 'setup.c')
-rw-r--r--setup.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/setup.c b/setup.c
index 03f51e0..9476851 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;