Skip to content

Commit bed137d

Browse files
devzero2000gitster
authored andcommitted
scripts: "export VAR=VALUE" construct is not portable
Found by check-non-portable-shell.pl Signed-off-by: Elia Pinto <[email protected]> Reviewed-by: Jonathan Nieder <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 7bbc4e8 commit bed137d

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

contrib/subtree/t/t7900-subtree.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ This test verifies the basic operation of the merge, pull, add
88
and split subcommands of git subtree.
99
'
1010

11-
export TEST_DIRECTORY=$(pwd)/../../../t
11+
TEST_DIRECTORY=$(pwd)/../../../t
12+
export TEST_DIRECTORY
1213

1314
. ../../../t/test-lib.sh
1415

git-remote-testgit.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ refspec="${GIT_REMOTE_TESTGIT_REFSPEC-$default_refspec}"
1313

1414
test -z "$refspec" && prefix="refs"
1515

16-
export GIT_DIR="$url/.git"
16+
GIT_DIR="$url/.git"
17+
export GIT_DIR
1718

1819
mkdir -p "$dir"
1920

git-stash.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,8 @@ create_stash () {
9494
# ease of unpacking later.
9595
u_commit=$(
9696
untracked_files | (
97-
export GIT_INDEX_FILE="$TMPindex"
97+
GIT_INDEX_FILE="$TMPindex" &&
98+
export GIT_INDEX_FILE &&
9899
rm -f "$TMPindex" &&
99100
git update-index -z --add --remove --stdin &&
100101
u_tree=$(git write-tree) &&

0 commit comments

Comments
 (0)