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

[PATCH 5/5] t7409: do not use export X=Y

From
Torsten Bögershausen <tboegi@web.de>
Date
Apr 26, 2013, 09:18 UTC
Message-ID
<201304261118.28538.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>
---
 t/t7409-submodule-detached-worktree.sh | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/t/t7409-submodule-detached-worktree.sh b/t/t7409-submodule-detached-worktree.sh
index 2fec13d..c207171 100755
--- a/t/t7409-submodule-detached-worktree.sh
+++ b/t/t7409-submodule-detached-worktree.sh
@@ -23,7 +23,9 @@ test_expect_success 'submodule on detached working tree' '
 	mkdir home &&
 	(
 		cd home &&
-		export GIT_WORK_TREE="$(pwd)" GIT_DIR="$(pwd)/.dotfiles" &&
+		GIT_WORK_TREE="$(pwd)" &&
+		GIT_DIR="$(pwd)/.dotfiles" &&
+		export GIT_WORK_TREE GIT_DIR &&
 		git clone --bare ../remote .dotfiles &&
 		git submodule add ../bundle1 .vim/bundle/sogood &&
 		test_commit "sogood" &&
@@ -39,7 +41,9 @@ test_expect_success 'submodule on detached working tree' '
 	(
 		cd home2 &&
 		git clone --bare ../remote .dotfiles &&
-		export GIT_WORK_TREE="$(pwd)" GIT_DIR="$(pwd)/.dotfiles" &&
+		GIT_WORK_TREE="$(pwd)" &&
+		GIT_DIR="$(pwd)/.dotfiles" &&
+		export GIT_WORK_TREE GIT_DIR &&
 		git checkout master &&
 		git submodule update --init &&
 		(
@@ -55,7 +59,8 @@ test_expect_success 'submodule on detached working pointed by core.worktree' '
 	mkdir home3 &&
 	(
 		cd home3 &&
-		export GIT_DIR="$(pwd)/.dotfiles" &&
+		GIT_DIR="$(pwd)/.dotfiles" &&
+		export GIT_DIR &&
 		git clone --bare ../remote "$GIT_DIR" &&
 		git config core.bare false &&
 		git config core.worktree .. &&
@@ -66,7 +71,8 @@ test_expect_success 'submodule on detached working pointed by core.worktree' '
 	) &&
 	(
 		cd home &&
-		export GIT_DIR="$(pwd)/.dotfiles" &&
+		GIT_DIR="$(pwd)/.dotfiles" &&
+		export GIT_DIR &&
 		git config core.bare false &&
 		git config core.worktree .. &&
 		git pull &&
-- 
1.8.2.1.614.g66d7af5
Message 1 of 1 in “t7409: do not use export X=Y”
  1. 5/5 t7409: 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.