]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/t5606-clone-options.sh
Merge branch 'bc/clone-bare-with-conflicting-config'
[thirdparty/git.git] / t / t5606-clone-options.sh
index 52e5789fb050d74db72d1ad62dab1cce5ba97793..428b0aac93fabd0b947294a9929dcab317fd72bd 100755 (executable)
@@ -104,12 +104,20 @@ test_expect_success 'redirected clone -v does show progress' '
 
 '
 
+test_expect_success 'clone does not segfault with --bare and core.bare=false' '
+       test_config_global core.bare false &&
+       git clone --bare parent clone-bare &&
+       echo true >expect &&
+       git -C clone-bare rev-parse --is-bare-repository >actual &&
+       test_cmp expect actual
+'
+
 test_expect_success 'chooses correct default initial branch name' '
        GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME= \
        git -c init.defaultBranch=foo init --bare empty &&
        test_config -C empty lsrefs.unborn advertise &&
        GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME= \
-       git -c init.defaultBranch=up clone empty whats-up &&
+       git -c init.defaultBranch=up -c protocol.version=2 clone empty whats-up &&
        test refs/heads/foo = $(git -C whats-up symbolic-ref HEAD) &&
        test refs/heads/foo = $(git -C whats-up config branch.foo.merge)
 '