Merge branch 'ep/shell-assign-and-export-vars'
authorJunio C Hamano <gitster@pobox.com>
Fri, 6 Jun 2014 18:38:51 +0000 (11:38 -0700)
committerJunio C Hamano <gitster@pobox.com>
Fri, 6 Jun 2014 18:38:51 +0000 (11:38 -0700)
* ep/shell-assign-and-export-vars:
scripts: more "export VAR=VALUE" fixes
scripts: "export VAR=VALUE" construct is not portable

contrib/subtree/t/t7900-subtree.sh
git-remote-testgit.sh
git-stash.sh
t/t3032-merge-recursive-options.sh
t/t5560-http-backend-noserver.sh
index b22b710c262ed6c55e97859aac8a2fd1c5adb219..6309d124ca2c97b2b1b9262c7b9470c576870069 100755 (executable)
@@ -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
 
index 1c006a0518e247d58759df98602f6dae3935caf6..a9c75a2360fec7a9ce5f22877a471f70bc405ff1 100755 (executable)
@@ -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
 
 force=
 
index af549c731779db02db29fef446014a58bc9a3996..bcc757b3900b02595e5b432edcfd590e312b48ce 100755 (executable)
@@ -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) &&
index 5fd7bbb65244bdf6470508b6bc79aef58e79e86d..4029c9c8c06d24887e7d9fa7c97c2c8c5826eb42 100755 (executable)
@@ -14,7 +14,11 @@ test_description='merge-recursive options
 . ./test-lib.sh
 
 test_have_prereq SED_STRIPS_CR && SED_OPTIONS=-b
-test_have_prereq GREP_STRIPS_CR && export GREP_OPTIONS=-U
+if test_have_prereq GREP_STRIPS_CR
+then
+       GREP_OPTIONS=-U
+       export GREP_OPTIONS
+fi
 
 test_expect_success 'setup' '
        conflict_hunks () {
index 5abd11a5638299f2d3fe41d38f9a3d10050a4e4b..aa73eeaef82adff56083fdc2d5d35d599b73edee 100755 (executable)
@@ -5,7 +5,11 @@ test_description='test git-http-backend-noserver'
 
 HTTPD_DOCUMENT_ROOT_PATH="$TRASH_DIRECTORY"
 
-test_have_prereq GREP_STRIPS_CR && export GREP_OPTIONS=-U
+if test_have_prereq GREP_STRIPS_CR
+then
+       GREP_OPTIONS=-U
+       export GREP_OPTIONS
+fi
 
 run_backend() {
        echo "$2" |