summaryrefslogtreecommitdiff
path: root/t/t5606-clone-options.sh
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2021-03-22 14:00:25 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2021-03-22 14:00:25 -0700
commit3099d4faa3ffb888cddb3b1fbba8f13a52f6726c (patch)
treed834b89db16a1098ed5e299a2b6a543130bc3148 /t/t5606-clone-options.sh
parentMerge branch 'jk/filter-branch-sha256' (diff)
parentbuiltin/init-db: handle bare clones when core.bare set to false (diff)
downloadtgif-3099d4faa3ffb888cddb3b1fbba8f13a52f6726c.tar.xz
Merge branch 'bc/clone-bare-with-conflicting-config'
"git -c core.bare=false clone --bare ..." would have segfaulted, which has been corrected. * bc/clone-bare-with-conflicting-config: builtin/init-db: handle bare clones when core.bare set to false
Diffstat (limited to 't/t5606-clone-options.sh')
-rwxr-xr-xt/t5606-clone-options.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/t/t5606-clone-options.sh b/t/t5606-clone-options.sh
index 1da6ddb2c5..428b0aac93 100755
--- a/t/t5606-clone-options.sh
+++ b/t/t5606-clone-options.sh
@@ -104,6 +104,14 @@ 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 &&