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
This commit is contained in:
Junio C Hamano 2017-11-15 12:05:01 +09:00
Родитель 934e330c9d fa4d8c783d
Коммит 16f8cd1fba
1 изменённых файлов: 3 добавлений и 1 удалений

Просмотреть файл

@ -312,7 +312,9 @@ int is_git_directory(const char *suspect)
size_t len; size_t len;
/* Check worktree-related signatures */ /* 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)) if (validate_headref(path.buf))
goto done; goto done;