[PATCH 07/10] fetch tests: remove lazy variable setup
- From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Date
- Jun 21, 2022, 22:34 UTC
- Message-ID
- <patch-07.10-267a6a6ab8f-20220621T222854Z-avarab@gmail.com>
- In-Reply-To
- <cover-00.10-00000000000-20220621T222854Z-avarab@gmail.com>
Remove the lazy test setup added in e1790f9245f (fetch tests: fetch <url> <spec> as well as fetch [<remote>], 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 <avarab@gmail.com> --- 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