Skip to content

Commit 85e4205

Browse files
bmwillgitster
authored andcommitted
lib-proto-disable: variable name fix
The test_proto function assigns the positional parameters to named variables, but then still refers to "$desc" as "$1". Using $desc is more readable and less error-prone. Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 3680f16 commit 85e4205

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

t/lib-proto-disable.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ test_proto () {
99
proto=$2
1010
url=$3
1111

12-
test_expect_success "clone $1 (enabled)" '
12+
test_expect_success "clone $desc (enabled)" '
1313
rm -rf tmp.git &&
1414
(
1515
GIT_ALLOW_PROTOCOL=$proto &&
@@ -18,7 +18,7 @@ test_proto () {
1818
)
1919
'
2020

21-
test_expect_success "fetch $1 (enabled)" '
21+
test_expect_success "fetch $desc (enabled)" '
2222
(
2323
cd tmp.git &&
2424
GIT_ALLOW_PROTOCOL=$proto &&
@@ -27,7 +27,7 @@ test_proto () {
2727
)
2828
'
2929

30-
test_expect_success "push $1 (enabled)" '
30+
test_expect_success "push $desc (enabled)" '
3131
(
3232
cd tmp.git &&
3333
GIT_ALLOW_PROTOCOL=$proto &&
@@ -36,7 +36,7 @@ test_proto () {
3636
)
3737
'
3838

39-
test_expect_success "push $1 (disabled)" '
39+
test_expect_success "push $desc (disabled)" '
4040
(
4141
cd tmp.git &&
4242
GIT_ALLOW_PROTOCOL=none &&
@@ -45,7 +45,7 @@ test_proto () {
4545
)
4646
'
4747

48-
test_expect_success "fetch $1 (disabled)" '
48+
test_expect_success "fetch $desc (disabled)" '
4949
(
5050
cd tmp.git &&
5151
GIT_ALLOW_PROTOCOL=none &&
@@ -54,7 +54,7 @@ test_proto () {
5454
)
5555
'
5656

57-
test_expect_success "clone $1 (disabled)" '
57+
test_expect_success "clone $desc (disabled)" '
5858
rm -rf tmp.git &&
5959
(
6060
GIT_ALLOW_PROTOCOL=none &&

0 commit comments

Comments
 (0)