Don't use the 'export NAME=value' in the test scripts.
This form is not portable across all shells, so replace instances of: export FOO=bar with: FOO=bar export FOO Signed-off-by: Bryan Donlan <bdonlan@fushizen.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Bryan Donlan committed
May 4, 2008 at 01:37 UTC
0e46e704626af5189c9c9ff2c0f348d2205c10f3
10 files changed
+52
-39
t/lib-httpd.sh
+2
-1
@@ -61,7 +61,8 @@ prepare_httpd() {
61
-new -x509 -nodes \
62
-out $HTTPD_ROOT_PATH/httpd.pem \
63
-keyout $HTTPD_ROOT_PATH/httpd.pem
64
- export GIT_SSL_NO_VERIFY=t
64
+ GIT_SSL_NO_VERIFY=t
65
+ export GIT_SSL_NO_VERIFY
66
HTTPD_PARA="$HTTPD_PARA -DSSL"
67
else
68
HTTPD_URL=http://127.0.0.1:$LIB_HTTPD_PORT
t/t1500-rev-parse.sh
+5
-4
@@ -51,8 +51,9 @@ test_rev_parse 'core.bare undefined' false false true
51
52
mkdir work || exit 1
53
cd work || exit 1
54
-export GIT_DIR=../.git
55
-export GIT_CONFIG="$(pwd)"/../.git/config
54
+GIT_DIR=../.git
55
+GIT_CONFIG="$(pwd)"/../.git/config
56
+export GIT_DIR GIT_CONFIG
57
58
git config core.bare false
59
test_rev_parse 'GIT_DIR=../.git, core.bare = false' false false true ''
@@ -64,8 +65,8 @@ git config --unset core.bare
65
test_rev_parse 'GIT_DIR=../.git, core.bare undefined' false false true ''
66
67
mv ../.git ../repo.git || exit 1
67
-export GIT_DIR=../repo.git
68
-export GIT_CONFIG="$(pwd)"/../repo.git/config
68
+GIT_DIR=../repo.git
69
+GIT_CONFIG="$(pwd)"/../repo.git/config
70
71
git config core.bare false
72
test_rev_parse 'GIT_DIR=../repo.git, core.bare = false' false false true ''
t/t1501-worktree.sh
+18
-16
@@ -32,24 +32,25 @@ mkdir -p work/sub/dir || exit 1
32
mv .git repo.git || exit 1
33
34
say "core.worktree = relative path"
35
-export GIT_DIR=repo.git
36
-export GIT_CONFIG="$(pwd)"/$GIT_DIR/config
35
+GIT_DIR=repo.git
36
+GIT_CONFIG="$(pwd)"/$GIT_DIR/config
37
+export GIT_DIR GIT_CONFIG
38
unset GIT_WORK_TREE
39
git config core.worktree ../work
40
test_rev_parse 'outside' false false false
41
cd work || exit 1
41
-export GIT_DIR=../repo.git
42
-export GIT_CONFIG="$(pwd)"/$GIT_DIR/config
42
+GIT_DIR=../repo.git
43
+GIT_CONFIG="$(pwd)"/$GIT_DIR/config
44
test_rev_parse 'inside' false false true ''
45
cd sub/dir || exit 1
45
-export GIT_DIR=../../../repo.git
46
-export GIT_CONFIG="$(pwd)"/$GIT_DIR/config
46
+GIT_DIR=../../../repo.git
47
+GIT_CONFIG="$(pwd)"/$GIT_DIR/config
48
test_rev_parse 'subdirectory' false false true sub/dir/
49
cd ../../.. || exit 1
50
51
say "core.worktree = absolute path"
51
-export GIT_DIR=$(pwd)/repo.git
52
-export GIT_CONFIG=$GIT_DIR/config
52
+GIT_DIR=$(pwd)/repo.git
53
+GIT_CONFIG=$GIT_DIR/config
54
git config core.worktree "$(pwd)/work"
55
test_rev_parse 'outside' false false false
56
cd work || exit 1
@@ -59,25 +60,26 @@ test_rev_parse 'subdirectory' false false true sub/dir/
60
cd ../../.. || exit 1
61
62
say "GIT_WORK_TREE=relative path (override core.worktree)"
62
-export GIT_DIR=$(pwd)/repo.git
63
-export GIT_CONFIG=$GIT_DIR/config
63
+GIT_DIR=$(pwd)/repo.git
64
+GIT_CONFIG=$GIT_DIR/config
65
git config core.worktree non-existent
65
-export GIT_WORK_TREE=work
66
+GIT_WORK_TREE=work
67
+export GIT_WORK_TREE
68
test_rev_parse 'outside' false false false
69
cd work || exit 1
68
-export GIT_WORK_TREE=.
70
+GIT_WORK_TREE=.
71
test_rev_parse 'inside' false false true ''
72
cd sub/dir || exit 1
71
-export GIT_WORK_TREE=../..
73
+GIT_WORK_TREE=../..
74
test_rev_parse 'subdirectory' false false true sub/dir/
75
cd ../../.. || exit 1
76
77
mv work repo.git/work
78
79
say "GIT_WORK_TREE=absolute path, work tree below git dir"
78
-export GIT_DIR=$(pwd)/repo.git
79
-export GIT_CONFIG=$GIT_DIR/config
80
-export GIT_WORK_TREE=$(pwd)/repo.git/work
80
+GIT_DIR=$(pwd)/repo.git
81
+GIT_CONFIG=$GIT_DIR/config
82
+GIT_WORK_TREE=$(pwd)/repo.git/work
83
test_rev_parse 'outside' false false false
84
cd repo.git || exit 1
85
test_rev_parse 'in repo.git' false true false
t/t3400-rebase.sh
+2
-1
@@ -9,7 +9,8 @@ This test runs git rebase and checks that the author information is not lost.
9
'
10
. ./test-lib.sh
11
12
-export GIT_AUTHOR_EMAIL=bogus_email_address
12
+GIT_AUTHOR_EMAIL=bogus_email_address
13
+export GIT_AUTHOR_EMAIL
14
15
test_expect_success \
16
'prepare repository with topic branches' \
t/t3500-cherry.sh
+2
-1
@@ -10,7 +10,8 @@ checks that git cherry only returns the second patch in the local branch
10
'
11
. ./test-lib.sh
12
13
-export GIT_AUTHOR_EMAIL=bogus_email_address
13
+GIT_AUTHOR_EMAIL=bogus_email_address
14
+export GIT_AUTHOR_EMAIL
15
16
test_expect_success \
17
'prepare repository with topic branch, and check cherry finds the 2 patches from there' \
t/t5500-fetch-pack.sh
+1
-1
@@ -31,7 +31,7 @@ add () {
31
sec=$(($sec+1))
32
commit=$(echo "$text" | GIT_AUTHOR_DATE=$sec \
33
git commit-tree $tree $parents 2>>log2.txt)
34
- export $name=$commit
34
+ eval "$name=$commit; export $name"
35
echo $commit > .git/refs/heads/$branch
36
eval ${branch}TIP=$commit
37
}
t/t6000lib.sh
+6
-3
@@ -49,13 +49,15 @@ as_author()
49
shift 1
50
_save=$GIT_AUTHOR_EMAIL
51
52
- export GIT_AUTHOR_EMAIL="$_author"
52
+ GIT_AUTHOR_EMAIL="$_author"
53
+ export GIT_AUTHOR_EMAIL
54
"$@"
55
if test -z "$_save"
56
then
57
unset GIT_AUTHOR_EMAIL
58
else
58
- export GIT_AUTHOR_EMAIL="$_save"
59
+ GIT_AUTHOR_EMAIL="$_save"
60
+ export GIT_AUTHOR_EMAIL
61
fi
62
}
63
@@ -69,7 +71,8 @@ on_committer_date()
71
{
72
_date=$1
73
shift 1
72
- export GIT_COMMITTER_DATE="$_date"
74
+ GIT_COMMITTER_DATE="$_date"
75
+ export GIT_COMMITTER_DATE
76
"$@"
77
unset GIT_COMMITTER_DATE
78
}
t/t6010-merge-base.sh
+5
-4
@@ -13,10 +13,11 @@ T=$(git write-tree)
13
M=1130000000
14
Z=+0000
15
16
-export GIT_COMMITTER_EMAIL=git@comm.iter.xz
17
-export GIT_COMMITTER_NAME='C O Mmiter'
18
-export GIT_AUTHOR_NAME='A U Thor'
19
-export GIT_AUTHOR_EMAIL=git@au.thor.xz
16
+GIT_COMMITTER_EMAIL=git@comm.iter.xz
17
+GIT_COMMITTER_NAME='C O Mmiter'
18
+GIT_AUTHOR_NAME='A U Thor'
19
+GIT_AUTHOR_EMAIL=git@au.thor.xz
20
+export GIT_COMMITTER_EMAIL GIT_COMMITTER_NAME GIT_AUTHOR_NAME GIT_AUTHOR_EMAIL
21
22
doit() {
23
OFFSET=$1; shift
t/t7004-tag.sh
+2
-1
@@ -626,7 +626,8 @@ esac
626
627
cp -R ../t7004 ./gpghome
628
chmod 0700 gpghome
629
-export GNUPGHOME="$(pwd)/gpghome"
629
+GNUPGHOME="$(pwd)/gpghome"
630
+export GNUPGHOME
631
632
get_tag_header signed-tag $commit commit $time >expect
633
echo 'A signed tag message' >>expect
t/t9500-gitweb-standalone-no-errors.sh
+9
-7
@@ -39,13 +39,15 @@ EOF
39
}
40
41
gitweb_run () {
42
- export GATEWAY_INTERFACE="CGI/1.1"
43
- export HTTP_ACCEPT="*/*"
44
- export REQUEST_METHOD="GET"
45
- export QUERY_STRING=""$1""
46
- export PATH_INFO=""$2""
47
-
48
- export GITWEB_CONFIG=$(pwd)/gitweb_config.perl
42
+ GATEWAY_INTERFACE="CGI/1.1"
43
+ HTTP_ACCEPT="*/*"
44
+ REQUEST_METHOD="GET"
45
+ QUERY_STRING=""$1""
46
+ PATH_INFO=""$2""
47
+ export GATEWAY_INTERFACE HTTP_ACCEPT REQUEST_METHOD QUERY_STRING PATH_INFO
48
+
49
+ GITWEB_CONFIG=$(pwd)/gitweb_config.perl
50
+ export GITWEB_CONFIG
51
52
# some of git commands write to STDERR on error, but this is not
53
# written to web server logs, so we are not interested in that: