summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: cdf3ec0)
raw | patch | inline | side by side (parent: cdf3ec0)
author | Bryan Donlan <bdonlan@fushizen.net> | |
Sun, 4 May 2008 05:37:58 +0000 (01:37 -0400) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 5 May 2008 21:17:01 +0000 (14:17 -0700) |
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>
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>
diff --git a/t/lib-httpd.sh b/t/lib-httpd.sh
index 7f206c56cf89451d09f777bcbd181fefedaabff2..a5c4436fd104e93ca74b11e11bc98238aaf83b29 100644 (file)
--- a/t/lib-httpd.sh
+++ b/t/lib-httpd.sh
-new -x509 -nodes \
-out $HTTPD_ROOT_PATH/httpd.pem \
-keyout $HTTPD_ROOT_PATH/httpd.pem
- export GIT_SSL_NO_VERIFY=t
+ GIT_SSL_NO_VERIFY=t
+ export GIT_SSL_NO_VERIFY
HTTPD_PARA="$HTTPD_PARA -DSSL"
else
HTTPD_URL=http://127.0.0.1:$LIB_HTTPD_PORT
diff --git a/t/t1500-rev-parse.sh b/t/t1500-rev-parse.sh
index 38a2bf09af286bf681deadb9cdaec80175d13e0c..85da4caa7ed1b8bcaca7b21e218f2d1839d2db82 100755 (executable)
--- a/t/t1500-rev-parse.sh
+++ b/t/t1500-rev-parse.sh
mkdir work || exit 1
cd work || exit 1
-export GIT_DIR=../.git
-export GIT_CONFIG="$(pwd)"/../.git/config
+GIT_DIR=../.git
+GIT_CONFIG="$(pwd)"/../.git/config
+export GIT_DIR GIT_CONFIG
git config core.bare false
test_rev_parse 'GIT_DIR=../.git, core.bare = false' false false true ''
test_rev_parse 'GIT_DIR=../.git, core.bare undefined' false false true ''
mv ../.git ../repo.git || exit 1
-export GIT_DIR=../repo.git
-export GIT_CONFIG="$(pwd)"/../repo.git/config
+GIT_DIR=../repo.git
+GIT_CONFIG="$(pwd)"/../repo.git/config
git config core.bare false
test_rev_parse 'GIT_DIR=../repo.git, core.bare = false' false false true ''
diff --git a/t/t1501-worktree.sh b/t/t1501-worktree.sh
index 7ee3820ce97b6c26c9465685a7bc64a962aad3cb..2ee88d8a069288d0d9f6931231162e04d6b0917a 100755 (executable)
--- a/t/t1501-worktree.sh
+++ b/t/t1501-worktree.sh
mv .git repo.git || exit 1
say "core.worktree = relative path"
-export GIT_DIR=repo.git
-export GIT_CONFIG="$(pwd)"/$GIT_DIR/config
+GIT_DIR=repo.git
+GIT_CONFIG="$(pwd)"/$GIT_DIR/config
+export GIT_DIR GIT_CONFIG
unset GIT_WORK_TREE
git config core.worktree ../work
test_rev_parse 'outside' false false false
cd work || exit 1
-export GIT_DIR=../repo.git
-export GIT_CONFIG="$(pwd)"/$GIT_DIR/config
+GIT_DIR=../repo.git
+GIT_CONFIG="$(pwd)"/$GIT_DIR/config
test_rev_parse 'inside' false false true ''
cd sub/dir || exit 1
-export GIT_DIR=../../../repo.git
-export GIT_CONFIG="$(pwd)"/$GIT_DIR/config
+GIT_DIR=../../../repo.git
+GIT_CONFIG="$(pwd)"/$GIT_DIR/config
test_rev_parse 'subdirectory' false false true sub/dir/
cd ../../.. || exit 1
say "core.worktree = absolute path"
-export GIT_DIR=$(pwd)/repo.git
-export GIT_CONFIG=$GIT_DIR/config
+GIT_DIR=$(pwd)/repo.git
+GIT_CONFIG=$GIT_DIR/config
git config core.worktree "$(pwd)/work"
test_rev_parse 'outside' false false false
cd work || exit 1
cd ../../.. || exit 1
say "GIT_WORK_TREE=relative path (override core.worktree)"
-export GIT_DIR=$(pwd)/repo.git
-export GIT_CONFIG=$GIT_DIR/config
+GIT_DIR=$(pwd)/repo.git
+GIT_CONFIG=$GIT_DIR/config
git config core.worktree non-existent
-export GIT_WORK_TREE=work
+GIT_WORK_TREE=work
+export GIT_WORK_TREE
test_rev_parse 'outside' false false false
cd work || exit 1
-export GIT_WORK_TREE=.
+GIT_WORK_TREE=.
test_rev_parse 'inside' false false true ''
cd sub/dir || exit 1
-export GIT_WORK_TREE=../..
+GIT_WORK_TREE=../..
test_rev_parse 'subdirectory' false false true sub/dir/
cd ../../.. || exit 1
mv work repo.git/work
say "GIT_WORK_TREE=absolute path, work tree below git dir"
-export GIT_DIR=$(pwd)/repo.git
-export GIT_CONFIG=$GIT_DIR/config
-export GIT_WORK_TREE=$(pwd)/repo.git/work
+GIT_DIR=$(pwd)/repo.git
+GIT_CONFIG=$GIT_DIR/config
+GIT_WORK_TREE=$(pwd)/repo.git/work
test_rev_parse 'outside' false false false
cd repo.git || exit 1
test_rev_parse 'in repo.git' false true false
diff --git a/t/t3400-rebase.sh b/t/t3400-rebase.sh
index 496f4ec17217769228954116528b0fc0c1ef2a62..10d7449b54b0f64d559f73435887fce17277b667 100755 (executable)
--- a/t/t3400-rebase.sh
+++ b/t/t3400-rebase.sh
'
. ./test-lib.sh
-export GIT_AUTHOR_EMAIL=bogus_email_address
+GIT_AUTHOR_EMAIL=bogus_email_address
+export GIT_AUTHOR_EMAIL
test_expect_success \
'prepare repository with topic branches' \
diff --git a/t/t3500-cherry.sh b/t/t3500-cherry.sh
index d0a440feba5f501a2320d52b36d1bb51ca8944dd..4911c48378a137471d2ad56747ceed11d0115be5 100755 (executable)
--- a/t/t3500-cherry.sh
+++ b/t/t3500-cherry.sh
'
. ./test-lib.sh
-export GIT_AUTHOR_EMAIL=bogus_email_address
+GIT_AUTHOR_EMAIL=bogus_email_address
+export GIT_AUTHOR_EMAIL
test_expect_success \
'prepare repository with topic branch, and check cherry finds the 2 patches from there' \
diff --git a/t/t5500-fetch-pack.sh b/t/t5500-fetch-pack.sh
index 788b4a5aae17d33ad688446bb60973952c3ca918..1700d0794cacc0854bd3133dfddd0677b3c899ef 100755 (executable)
--- a/t/t5500-fetch-pack.sh
+++ b/t/t5500-fetch-pack.sh
sec=$(($sec+1))
commit=$(echo "$text" | GIT_AUTHOR_DATE=$sec \
git commit-tree $tree $parents 2>>log2.txt)
- export $name=$commit
+ eval "$name=$commit; export $name"
echo $commit > .git/refs/heads/$branch
eval ${branch}TIP=$commit
}
diff --git a/t/t6000lib.sh b/t/t6000lib.sh
index c0baaa536079b1213d83bbf234ac688567c95237..f55627b641682e72d58a2282639ca589b38fa744 100755 (executable)
--- a/t/t6000lib.sh
+++ b/t/t6000lib.sh
shift 1
_save=$GIT_AUTHOR_EMAIL
- export GIT_AUTHOR_EMAIL="$_author"
+ GIT_AUTHOR_EMAIL="$_author"
+ export GIT_AUTHOR_EMAIL
"$@"
if test -z "$_save"
then
unset GIT_AUTHOR_EMAIL
else
- export GIT_AUTHOR_EMAIL="$_save"
+ GIT_AUTHOR_EMAIL="$_save"
+ export GIT_AUTHOR_EMAIL
fi
}
{
_date=$1
shift 1
- export GIT_COMMITTER_DATE="$_date"
+ GIT_COMMITTER_DATE="$_date"
+ export GIT_COMMITTER_DATE
"$@"
unset GIT_COMMITTER_DATE
}
diff --git a/t/t6010-merge-base.sh b/t/t6010-merge-base.sh
index 96f3d355301cf9e2daf58d219c3cf6cbdd118d82..b6e57b2426728cce308a57315247cd2a66cabf4a 100755 (executable)
--- a/t/t6010-merge-base.sh
+++ b/t/t6010-merge-base.sh
M=1130000000
Z=+0000
-export GIT_COMMITTER_EMAIL=git@comm.iter.xz
-export GIT_COMMITTER_NAME='C O Mmiter'
-export GIT_AUTHOR_NAME='A U Thor'
-export GIT_AUTHOR_EMAIL=git@au.thor.xz
+GIT_COMMITTER_EMAIL=git@comm.iter.xz
+GIT_COMMITTER_NAME='C O Mmiter'
+GIT_AUTHOR_NAME='A U Thor'
+GIT_AUTHOR_EMAIL=git@au.thor.xz
+export GIT_COMMITTER_EMAIL GIT_COMMITTER_NAME GIT_AUTHOR_NAME GIT_AUTHOR_EMAIL
doit() {
OFFSET=$1; shift
diff --git a/t/t7004-tag.sh b/t/t7004-tag.sh
index 1a7141ecd7ad1ffcd5081181548920b6a199ab2c..2dcee7ccc572bbc9b239ff805aede076ff926f49 100755 (executable)
--- a/t/t7004-tag.sh
+++ b/t/t7004-tag.sh
cp -R ../t7004 ./gpghome
chmod 0700 gpghome
-export GNUPGHOME="$(pwd)/gpghome"
+GNUPGHOME="$(pwd)/gpghome"
+export GNUPGHOME
get_tag_header signed-tag $commit commit $time >expect
echo 'A signed tag message' >>expect
index 061a2596d3b63e7d737d735c4a6cb097bfcf387f..3dc261d80bc8f83c26355c9125d1b98923d885ff 100755 (executable)
}
gitweb_run () {
- export GATEWAY_INTERFACE="CGI/1.1"
- export HTTP_ACCEPT="*/*"
- export REQUEST_METHOD="GET"
- export QUERY_STRING=""$1""
- export PATH_INFO=""$2""
-
- export GITWEB_CONFIG=$(pwd)/gitweb_config.perl
+ GATEWAY_INTERFACE="CGI/1.1"
+ HTTP_ACCEPT="*/*"
+ REQUEST_METHOD="GET"
+ QUERY_STRING=""$1""
+ PATH_INFO=""$2""
+ export GATEWAY_INTERFACE HTTP_ACCEPT REQUEST_METHOD QUERY_STRING PATH_INFO
+
+ GITWEB_CONFIG=$(pwd)/gitweb_config.perl
+ export GITWEB_CONFIG
# some of git commands write to STDERR on error, but this is not
# written to web server logs, so we are not interested in that: