git-init somehow reads '.git/config' at current directory and sets
log_all_ref_updates based on this file. Because log_all_ref_updates is
not unspecified (-1) any more. It will not be written to the new repo's
config file (see create_default_files() function).

This will affect our tests in the next patch as we will compare the
config file and expect that core.logallrefupdates is already set to true
by "git init main-worktree".

Signed-off-by: Nguyễn Thái Ngọc Duy <>
 t/ | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/t/ b/t/
index d64e5e3..393c940 100755
--- a/t/
+++ b/t/
@@ -385,7 +385,9 @@ test_expect_success MINGW 'bare git dir not hidden' '
 test_expect_success 're-init from a linked worktree' '
+       mv .git/config work-around-init-reading-wrong-file &&
        git init main-worktree &&
+       mv work-around-init-reading-wrong-file .git/config &&
                cd main-worktree &&
                test_commit first &&

Reply via email to