threads / patch / 33615

patch, 5 partstest-hg-hg-git.sh: do not use export X=Y

Subject: [PATCH 4/5] test-hg-hg-git.sh: do not use export X=Y

## tl;dr

One message between Apr 26, 2013 and Apr 26, 2013. Diffs are folded; open one to read it.

replies: 0people: 1as markdown or json

Torsten Bögershausen· Apr 26, 2013, 09:17 UTC · lore

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

Signed-off-by: Torsten Bögershausen <tboegi@web.de>
---
 contrib/remote-helpers/test-hg-hg-git.sh | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
Show changes to contrib/remote-helpers/test-hg-hg-git.sh +6 −4
diff --git a/contrib/remote-helpers/test-hg-hg-git.sh b/contrib/remote-helpers/test-hg-hg-git.sh
index 253e65a..8440341 100755
--- a/contrib/remote-helpers/test-hg-hg-git.sh
+++ b/contrib/remote-helpers/test-hg-hg-git.sh
@@ -103,10 +103,11 @@ setup () {
 	git config --global receive.denycurrentbranch warn
 	git config --global remote-hg.hg-git-compat true
 
-	export HGEDITOR=/usr/bin/true
+	HGEDITOR=/usr/bin/true
 
-	export GIT_AUTHOR_DATE="2007-01-01 00:00:00 +0230"
-	export GIT_COMMITTER_DATE="$GIT_AUTHOR_DATE"
+	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
@@ -296,7 +297,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

← back to recent threads