diff mbox series

[02/10] fetch tests: use named, not positional parameters

Message ID patch-02.10-88bde1a82a6-20220621T222854Z-avarab@gmail.com (mailing list archive)
State New, archived
Headers show
Series t5510: fix the quoting mess | expand

Commit Message

Ævar Arnfjörð Bjarmason June 21, 2022, 10:34 p.m. UTC
Use the named parameters we've already unpacked from "$@" rather than
the positional paremeters. There's no functional changes here.

This changes code that dates back to the initial introduction of the
function in 737c5a9cde7 (fetch: make --prune configurable,
2013-07-13), although e.g. e249ce0ccdb (fetch tests: add scaffolding
for the new fetch.pruneTags, 2018-02-09) added many more parameters.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
 t/t5510-fetch.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/t/t5510-fetch.sh b/t/t5510-fetch.sh
index d784a761ba0..37e12de2475 100755
--- a/t/t5510-fetch.sh
+++ b/t/t5510-fetch.sh
@@ -868,7 +868,7 @@  test_configured_prune_type () {
 		cmdline="$new_cmdline"
 	fi
 
-	test_expect_success "$mode prune fetch.prune=$1 remote.origin.prune=$2 fetch.pruneTags=$3 remote.origin.pruneTags=$4${7:+ $7}; branch:$5 tag:$6" '
+	test_expect_success "$mode prune fetch.prune=$fetch_prune remote.origin.prune=$remote_origin_prune fetch.pruneTags=$fetch_prune_tags remote.origin.pruneTags=$remote_origin_prune_tags${cmdline:+ $cmdline}; branch:$expected_branch tag:$expected_tag" '
 		# make sure a newbranch is there in . and also in one
 		git branch -f newbranch &&
 		git tag -f newtag &&