t5615: fix a here-doc syntax error
[gitweb.git] / t / t0001-init.sh
index a6fdd5ef3a66f06f5b4a787ca8ad8db2ab4da96f..b8fc588b1922760ade8502fda3dc465f6ebf2887 100755 (executable)
@@ -384,4 +384,30 @@ test_expect_success MINGW 'bare git dir not hidden' '
        ! is_hidden newdir
 '
 
+test_expect_success 'remote init from does not use config from cwd' '
+       rm -rf newdir &&
+       test_config core.logallrefupdates true &&
+       git init newdir &&
+       echo true >expect &&
+       git -C newdir config --bool core.logallrefupdates >actual &&
+       test_cmp expect actual
+'
+
+test_expect_success 're-init from a linked worktree' '
+       git init main-worktree &&
+       (
+               cd main-worktree &&
+               test_commit first &&
+               git worktree add ../linked-worktree &&
+               mv .git/info/exclude expected-exclude &&
+               cp .git/config expected-config &&
+               find .git/worktrees -print | sort >expected &&
+               git -C ../linked-worktree init &&
+               test_cmp expected-exclude .git/info/exclude &&
+               test_cmp expected-config .git/config &&
+               find .git/worktrees -print | sort >actual &&
+               test_cmp expected actual
+       )
+'
+
 test_done