scripts: "export VAR=VALUE" construct is not portable

Found by check-non-portable-shell.pl

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Elia Pinto 2014-05-23 03:15:31 -07:00 committed by Junio C Hamano
parent 7bbc4e8fdb
commit bed137d2d5
3 changed files with 6 additions and 3 deletions

View file

@ -8,7 +8,8 @@ This test verifies the basic operation of the merge, pull, add
and split subcommands of git subtree.
'
export TEST_DIRECTORY=$(pwd)/../../../t
TEST_DIRECTORY=$(pwd)/../../../t
export TEST_DIRECTORY
. ../../../t/test-lib.sh

View file

@ -13,7 +13,8 @@ refspec="${GIT_REMOTE_TESTGIT_REFSPEC-$default_refspec}"
test -z "$refspec" && prefix="refs"
export GIT_DIR="$url/.git"
GIT_DIR="$url/.git"
export GIT_DIR
mkdir -p "$dir"

View file

@ -94,7 +94,8 @@ create_stash () {
# ease of unpacking later.
u_commit=$(
untracked_files | (
export GIT_INDEX_FILE="$TMPindex"
GIT_INDEX_FILE="$TMPindex" &&
export GIT_INDEX_FILE &&
rm -f "$TMPindex" &&
git update-index -z --add --remove --stdin &&
u_tree=$(git write-tree) &&