fetch tests: refactor in preparation for testing tag pruning
[gitweb.git] / t / t5510-fetch.sh
index 668c54be41eb4fda17e9b43000081c7b374990c2..11da97f9b7ad8430e4a399c73ee46e16348ec692 100755 (executable)
@@ -549,9 +549,12 @@ set_config_tristate () {
 }
 
 test_configured_prune () {
-       fetch_prune=$1 remote_origin_prune=$2 cmdline=$3 expected=$4
+       fetch_prune=$1
+       remote_origin_prune=$2
+       cmdline=$3
+       expected_branch=$4
 
-       test_expect_success "prune fetch.prune=$1 remote.origin.prune=$2${3:+ $3}; $4" '
+       test_expect_success "prune fetch.prune=$1 remote.origin.prune=$2${3:+ $3}; branch:$4" '
                # make sure a newbranch is there in . and also in one
                git branch -f newbranch &&
                (
@@ -572,7 +575,7 @@ test_configured_prune () {
                        set_config_tristate remote.origin.prune $remote_origin_prune &&
 
                        git fetch $cmdline &&
-                       case "$expected" in
+                       case "$expected_branch" in
                        pruned)
                                test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
                                ;;