From: Ævar Arnfjörð Bjarmason Date: Tue, 21 Jun 2022 22:34:19 GMT Subject: [PATCH 07/10] fetch tests: remove lazy variable setup Message-ID: In-Reply-To: Remove the lazy test setup added in e1790f9245f (fetch tests: fetch as well as fetch [], 2018-02-09) to make it clear that these variables aren't changing across runs. We can also do away with the shell invocations here, but let's do that in a subsequent commit, for now this shows that it's safe to do this more than once. Signed-off-by: Ævar Arnfjörð Bjarmason --- t/t5510-fetch.sh | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/t/t5510-fetch.sh b/t/t5510-fetch.sh index c56a00f1a17..7cfef0082c0 100755 --- a/t/t5510-fetch.sh +++ b/t/t5510-fetch.sh @@ -846,14 +846,9 @@ test_configured_prune_type () { shift 6 && local cmdline="$@" && - if test -z "$cmdline_setup" - then - test_expect_success 'setup cmdline_setup variable for subsequent test' ' - remote_url="file://$(git -C one config remote.origin.url)" && - remote_fetch="$(git -C one config remote.origin.fetch)" && - cmdline_setup="\"$remote_url\" \"$remote_fetch\"" - ' - fi && + remote_url="file://$(git -C one config remote.origin.url)" && + remote_fetch="$(git -C one config remote.origin.fetch)" && + cmdline_setup="\"$remote_url\" \"$remote_fetch\"" && if test "$mode" = 'link' then -- 2.36.1.1239.gfba91521d90