Skip to content

Commit 3ea8ecc

Browse files
committed
Merge branch 'ep/shell-assign-and-export-vars'
* ep/shell-assign-and-export-vars: scripts: more "export VAR=VALUE" fixes scripts: "export VAR=VALUE" construct is not portable
2 parents ed47bbd + c1cebcf commit 3ea8ecc

File tree

5 files changed

+16
-5
lines changed

5 files changed

+16
-5
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
force=
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) &&

t/t3032-merge-recursive-options.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,11 @@ test_description='merge-recursive options
1414
. ./test-lib.sh
1515

1616
test_have_prereq SED_STRIPS_CR && SED_OPTIONS=-b
17-
test_have_prereq GREP_STRIPS_CR && export GREP_OPTIONS=-U
17+
if test_have_prereq GREP_STRIPS_CR
18+
then
19+
GREP_OPTIONS=-U
20+
export GREP_OPTIONS
21+
fi
1822

1923
test_expect_success 'setup' '
2024
conflict_hunks () {

t/t5560-http-backend-noserver.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@ test_description='test git-http-backend-noserver'
55

66
HTTPD_DOCUMENT_ROOT_PATH="$TRASH_DIRECTORY"
77

8-
test_have_prereq GREP_STRIPS_CR && export GREP_OPTIONS=-U
8+
if test_have_prereq GREP_STRIPS_CR
9+
then
10+
GREP_OPTIONS=-U
11+
export GREP_OPTIONS
12+
fi
913

1014
run_backend() {
1115
echo "$2" |

0 commit comments

Comments
 (0)