git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2] Get rid of the non portable shell export VAR=VALUE costruct

From
Junio C Hamano <gitster@pobox.com>
Date
May 23, 2014, 18:18 UTC
Message-ID
<xmqqmwe8jr44.fsf@gitster.dls.corp.google.com>
In-Reply-To
<1400840131-966-1-git-send-email-gitter.spiros@gmail.com>
Elia Pinto <gitter.spiros@gmail.com> writes:
> Found by check-non-portable-shell.pl
Thanks.
Makes me wonder why these two were missed, though.
 t/t3032-merge-recursive-options.sh | 6 +++++-
 t/t5560-http-backend-noserver.sh   | 6 +++++-
 2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/t/t3032-merge-recursive-options.sh b/t/t3032-merge-recursive-options.sh
index 5fd7bbb..4029c9c 100755
--- a/t/t3032-merge-recursive-options.sh
+++ b/t/t3032-merge-recursive-options.sh
@@ -14,7 +14,11 @@ test_description='merge-recursive options
 . ./test-lib.sh
 
 test_have_prereq SED_STRIPS_CR && SED_OPTIONS=-b
-test_have_prereq GREP_STRIPS_CR && export GREP_OPTIONS=-U
+if test_have_prereq GREP_STRIPS_CR
+then
+	GREP_OPTIONS=-U
+	export GREP_OPTIONS
+fi
 
 test_expect_success 'setup' '
 	conflict_hunks () {
diff --git a/t/t5560-http-backend-noserver.sh b/t/t5560-http-backend-noserver.sh
index 9be9ae3..1e25128 100755
--- a/t/t5560-http-backend-noserver.sh
+++ b/t/t5560-http-backend-noserver.sh
@@ -5,7 +5,11 @@ test_description='test git-http-backend-noserver'
 
 HTTPD_DOCUMENT_ROOT_PATH="$TRASH_DIRECTORY"
 
-test_have_prereq GREP_STRIPS_CR && export GREP_OPTIONS=-U
+if test_have_prereq GREP_STRIPS_CR
+then
+	GREP_OPTIONS=-U
+	export GREP_OPTIONS
+fi
 
 run_backend() {
 	echo "$2" |
Previous: Jonathan NiederNext: Junio C Hamano
Message 3 of 10 in “Get rid of the non portable shell export VAR=VALUE costruct”
  1. Get rid of the non portable shell export VAR=VALUE costructElia Pinto, May 23, 2014
  2. Jonathan NiederMay 23, 2014
  3. Junio C HamanoMay 23, 2014
  4. Junio C HamanoMay 23, 2014
  5. Jonathan NiederMay 23, 2014
  6. Jonathan NiederMay 23, 2014
  7. Torsten BögershausenMay 23, 2014
  8. Junio C HamanoMay 23, 2014
  9. Junio C HamanoMay 23, 2014
  10. Eric SunshineMay 23, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.