From: Nguyễn Thái Ngọc Duy Date: Thu, 08 Sep 2016 13:47:18 GMT Subject: [PATCH 2/3] t0001: work around the bug that reads config file before repo setup Message-ID: <20160908134719.27955-3-pclouds@gmail.com> In-Reply-To: <20160908134719.27955-1-pclouds@gmail.com> 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/t0001-init.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/t/t0001-init.sh b/t/t0001-init.sh index d64e5e3..393c940 100755 --- a/t/t0001-init.sh +++ b/t/t0001-init.sh @@ -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 && -- 2.8.2.524.g6ff3d78