Skip to content

Commit 16f8cd1

Browse files
committed
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
2 parents 934e330 + fa4d8c7 commit 16f8cd1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

setup.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,9 @@ int is_git_directory(const char *suspect)
312312
size_t len;
313313

314314
/* Check worktree-related signatures */
315-
strbuf_addf(&path, "%s/HEAD", suspect);
315+
strbuf_addstr(&path, suspect);
316+
strbuf_complete(&path, '/');
317+
strbuf_addstr(&path, "HEAD");
316318
if (validate_headref(path.buf))
317319
goto done;
318320

0 commit comments

Comments
 (0)