Skip to content

avoid use of "VAR= cmd" with a shell function (Re: [PATCH 3/5] test: request GIT_TEST_PROTOCOL_VERSION=0 when appropriate)

Jonathan Nieder git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2fetch test: avoid use of "VAR= cmd" with a shell functiont/t5552-skipping-fetch-negotiator.sh+5 -10 replies
2/2t/check-non-portable-shell: detect "FOO= shell_func", toot/check-non-portable-shell.pl+1 -15 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] avoid use of "VAR= cmd" with a shell function (Re: [PATCH 3/5] test: request GIT_TEST_PROTOCOL_VERSION=0 when appropriate)

Hi,

Quoted 8 lines · Junio C Hamano
Quoted 6 lines · Jonathan Nieder
t/t5552-skipping-fetch-negotiator.sh +0 -0
index f70cbcc9ca..a2a5e0743f 100755
@@ -107,7 +107,7 @@ test_expect_success 'use ref advertisement to filter out commits' '
 
Quoted 6 lines

t/t5552-skipping-fetch-negotiator.sh test_expect_success 'use ref advertisement to filter out commits' ' · line 110

Quoted 4 lines
t/t5552-skipping-fetch-negotiator.sh +1 -1
 	# The ref advertisement itself is filtered when protocol v2 is used, so
 	# use v0.
-	GIT_TEST_PROTOCOL_VERSION= trace_fetch client origin to_fetch &&
+	GIT_TEST_PROTOCOL_VERSION=0 trace_fetch client origin to_fetch &&

Didn't this trigger "FOO=bar shell_func" test lint for you?

It does indeed. Here are some preparatory patches to handle that.

Jonathan Nieder (2):
fetch test: avoid use of "VAR= cmd" with a shell function t/check-non-portable-shell: detect "FOO= shell_func", too

 t/check-non-portable-shell.pl        | 2 +-
 t/t5552-skipping-fetch-negotiator.sh | 6 +++++-
 2 files changed, 6 insertions(+), 2 deletions(-)

base-commit: 99c33bed562b41de6ce9bd3fd561303d39645048