From: Jonathan Nieder Date: Thu, 26 Dec 2019 19:53:57 GMT Subject: [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) Message-ID: <20191226195357.GA170890@google.com> In-Reply-To: Hi, Junio C Hamano wrote: > Jonathan Nieder writes: >> diff --git a/t/t5552-skipping-fetch-negotiator.sh b/t/t5552-skipping-fetch-negotiator.sh >> index f70cbcc9ca..a2a5e0743f 100755 >> --- a/t/t5552-skipping-fetch-negotiator.sh >> +++ b/t/t5552-skipping-fetch-negotiator.sh >> @@ -107,7 +107,7 @@ test_expect_success 'use ref advertisement to filter out commits' ' >> >> # 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