summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElia Pinto <gitter.spiros@gmail.com>2014-05-23 03:15:31 -0700
committerJunio C Hamano <gitster@pobox.com>2014-05-23 15:32:33 -0700
commitbed137d2d55a3b5cbd642b1e80cd7bd9094db8d4 (patch)
tree1f7c896f16f22e70245e05d6e7db639e6f3a7c81
parent7bbc4e8fdb33e0a8e42e77cc05460d4c4f615f4d (diff)
downloadgit-bed137d2d55a3b5cbd642b1e80cd7bd9094db8d4.tar.gz
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>
-rwxr-xr-xcontrib/subtree/t/t7900-subtree.sh3
-rwxr-xr-xgit-remote-testgit.sh3
-rwxr-xr-xgit-stash.sh3
3 files changed, 6 insertions, 3 deletions
diff --git a/contrib/subtree/t/t7900-subtree.sh b/contrib/subtree/t/t7900-subtree.sh
index 66ce4b07c2..8dc6840353 100755
--- a/contrib/subtree/t/t7900-subtree.sh
+++ b/contrib/subtree/t/t7900-subtree.sh
@@ -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
diff --git a/git-remote-testgit.sh b/git-remote-testgit.sh
index 6d2f282d32..cbf470f64f 100755
--- a/git-remote-testgit.sh
+++ b/git-remote-testgit.sh
@@ -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"
diff --git a/git-stash.sh b/git-stash.sh
index f0a94abf14..fc3005a7a2 100755
--- a/git-stash.sh
+++ b/git-stash.sh
@@ -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) &&