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

[PATCH 3/5] test-hg-bidi.sh: do not use export X=Y

From
Torsten Bögershausen <tboegi@web.de>
Date
Apr 26, 2013, 09:17 UTC
Message-ID
<201304261117.57010.tboegi@web.de>

The shell syntax "export X=Y A=B" is not understood by all shells. Split the non portable line into separate lines like this: A=B X=Y export A X

Signed-off-by: Torsten Bögershausen <tboegi@web.de>
---
 contrib/remote-helpers/test-hg-bidi.sh | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/contrib/remote-helpers/test-hg-bidi.sh b/contrib/remote-helpers/test-hg-bidi.sh
index f368953..f569697 100755
--- a/contrib/remote-helpers/test-hg-bidi.sh
+++ b/contrib/remote-helpers/test-hg-bidi.sh
@@ -68,10 +68,10 @@ setup () {
 	) >> "$HOME"/.hgrc &&
 	git config --global remote-hg.hg-git-compat true
 
-	export HGEDITOR=/usr/bin/true
-
-	export GIT_AUTHOR_DATE="2007-01-01 00:00:00 +0230"
-	export GIT_COMMITTER_DATE="$GIT_AUTHOR_DATE"
+	HGEDITOR=/usr/bin/true
+	GIT_AUTHOR_DATE="2007-01-01 00:00:00 +0230"
+	GIT_COMMITTER_DATE="$GIT_AUTHOR_DATE"
+	export HGEDITOR GIT_AUTHOR_DATE GIT_COMMITTER_DATE
 }
 
 setup
@@ -88,7 +88,8 @@ test_expect_success 'encoding' '
 	git add alpha &&
 	git commit -m "add älphà" &&
 
-	export GIT_AUTHOR_NAME="tést èncödîng" &&
+	GIT_AUTHOR_NAME="tést èncödîng" &&
+	export GIT_AUTHOR_NAME &&
 	echo beta > beta &&
 	git add beta &&
 	git commit -m "add beta" &&
-- 
1.8.2.1.614.g66d7af5
Message 1 of 1 in “test-hg-bidi.sh: do not use export X=Y”
  1. 3/5 test-hg-bidi.sh: do not use export X=YTorsten Bögershausen, Apr 26, 2013

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.