diff options
author | Junio C Hamano <gitster@pobox.com> | 2017-11-09 14:31:29 +0900 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-11-09 14:31:29 +0900 |
commit | 57dd3dd28724a150e6c6d4c1c8363e1efd49c197 (patch) | |
tree | 89d76fc06e9e2bc0e6f058f3784445a6d5e1b384 /setup.c | |
parent | 487a05f4653e26e8f75750547d91dd8c8166790e (diff) | |
parent | fa4d8c783d780191d98fe1f68ad2dea2fe78d19c (diff) | |
download | git-57dd3dd28724a150e6c6d4c1c8363e1efd49c197.tar.gz |
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.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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; |