Re: [PATCH v2] builtin/init-db: handle bare clones when core.bare set to false

2 messages, 2 authors, 2021-03-10 · open the first message on its own page

Re: [PATCH v2] builtin/init-db: handle bare clones when core.bare set to false

From: Junio C Hamano <hidden>
Date: 2021-03-10 23:10:30

"brian m. carlson" [off-list ref] writes:
quoted hunk
diff --git a/t/t5606-clone-options.sh b/t/t5606-clone-options.sh
index 52e5789fb0..c2b71e78c5 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 &&
Because "git clone" does so many different things from the normal
codepath in the "local" codepath, I'd prefer to see this one done
with the "--no-local" option (or alternatively, we could test both,
but that may be overkill).
quoted hunk
+	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 &&

Re: [PATCH v2] builtin/init-db: handle bare clones when core.bare set to false

From: brian m. carlson <hidden>
Date: 2021-03-10 23:34:15

On 2021-03-10 at 23:09:32, Junio C Hamano wrote:
"brian m. carlson" [off-list ref] writes:
quoted
diff --git a/t/t5606-clone-options.sh b/t/t5606-clone-options.sh
index 52e5789fb0..c2b71e78c5 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 &&
Because "git clone" does so many different things from the normal
codepath in the "local" codepath, I'd prefer to see this one done
with the "--no-local" option (or alternatively, we could test both,
but that may be overkill).
I can reroll with that.
-- 
brian m. carlson (he/him or they/them)
Houston, Texas, US
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help