Skip to content

Commit a8addfe

Browse files
tboegigitster
authored andcommitted
t7409: do not use export X=Y
The shell syntax "export X=Y A=B" is not understood by all shells. Signed-off-by: Torsten Bögershausen <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 86c5e14 commit a8addfe

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

t/t7409-submodule-detached-worktree.sh

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ test_expect_success 'submodule on detached working tree' '
2323
mkdir home &&
2424
(
2525
cd home &&
26-
export GIT_WORK_TREE="$(pwd)" GIT_DIR="$(pwd)/.dotfiles" &&
26+
GIT_WORK_TREE="$(pwd)" &&
27+
GIT_DIR="$(pwd)/.dotfiles" &&
28+
export GIT_WORK_TREE GIT_DIR &&
2729
git clone --bare ../remote .dotfiles &&
2830
git submodule add ../bundle1 .vim/bundle/sogood &&
2931
test_commit "sogood" &&
@@ -39,7 +41,9 @@ test_expect_success 'submodule on detached working tree' '
3941
(
4042
cd home2 &&
4143
git clone --bare ../remote .dotfiles &&
42-
export GIT_WORK_TREE="$(pwd)" GIT_DIR="$(pwd)/.dotfiles" &&
44+
GIT_WORK_TREE="$(pwd)" &&
45+
GIT_DIR="$(pwd)/.dotfiles" &&
46+
export GIT_WORK_TREE GIT_DIR &&
4347
git checkout master &&
4448
git submodule update --init &&
4549
(
@@ -55,7 +59,8 @@ test_expect_success 'submodule on detached working pointed by core.worktree' '
5559
mkdir home3 &&
5660
(
5761
cd home3 &&
58-
export GIT_DIR="$(pwd)/.dotfiles" &&
62+
GIT_DIR="$(pwd)/.dotfiles" &&
63+
export GIT_DIR &&
5964
git clone --bare ../remote "$GIT_DIR" &&
6065
git config core.bare false &&
6166
git config core.worktree .. &&
@@ -66,7 +71,8 @@ test_expect_success 'submodule on detached working pointed by core.worktree' '
6671
) &&
6772
(
6873
cd home &&
69-
export GIT_DIR="$(pwd)/.dotfiles" &&
74+
GIT_DIR="$(pwd)/.dotfiles" &&
75+
export GIT_DIR &&
7076
git config core.bare false &&
7177
git config core.worktree .. &&
7278
git pull &&

0 commit comments

Comments
 (0)