From: Bryan Donlan <bdonlan@fushizen.net>
To: git@vger.kernel.org
Cc: Johannes Sixt <j.sixt@viscovery.net>,
Adam Roben <aroben@apple.com>,
gitster@pobox.com, Bryan Donlan <bdonlan@fushizen.net>
Subject: [PATCH v3 08/10] Don't use the export NAME=value form in the test scripts.
Date: Sun, 4 May 2008 01:37:58 -0400 [thread overview]
Message-ID: <1209879480-16910-9-git-send-email-bdonlan@fushizen.net> (raw)
In-Reply-To: <1209879480-16910-8-git-send-email-bdonlan@fushizen.net>
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>
---
t/lib-httpd.sh | 3 +-
t/t1500-rev-parse.sh | 9 ++++---
t/t1501-worktree.sh | 34 ++++++++++++++++---------------
t/t3400-rebase.sh | 3 +-
t/t3500-cherry.sh | 3 +-
t/t5500-fetch-pack.sh | 2 +-
t/t6000lib.sh | 9 +++++--
t/t6010-merge-base.sh | 9 ++++---
t/t7004-tag.sh | 3 +-
t/t9500-gitweb-standalone-no-errors.sh | 16 ++++++++------
10 files changed, 52 insertions(+), 39 deletions(-)
diff --git a/t/lib-httpd.sh b/t/lib-httpd.sh
index 7f206c5..a5c4436 100644
--- a/t/lib-httpd.sh
+++ b/t/lib-httpd.sh
@@ -61,7 +61,8 @@ prepare_httpd() {
-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 38a2bf0..85da4ca 100755
--- a/t/t1500-rev-parse.sh
+++ b/t/t1500-rev-parse.sh
@@ -51,8 +51,9 @@ test_rev_parse 'core.bare undefined' false false true
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 ''
@@ -64,8 +65,8 @@ git config --unset core.bare
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 7ee3820..2ee88d8 100755
--- a/t/t1501-worktree.sh
+++ b/t/t1501-worktree.sh
@@ -32,24 +32,25 @@ mkdir -p work/sub/dir || exit 1
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
@@ -59,25 +60,26 @@ test_rev_parse 'subdirectory' false false true sub/dir/
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 496f4ec..10d7449 100755
--- a/t/t3400-rebase.sh
+++ b/t/t3400-rebase.sh
@@ -9,7 +9,8 @@ This test runs git rebase and checks that the author information is not lost.
'
. ./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 d0a440f..4911c48 100755
--- a/t/t3500-cherry.sh
+++ b/t/t3500-cherry.sh
@@ -10,7 +10,8 @@ checks that git cherry only returns the second patch in the local branch
'
. ./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 788b4a5..1700d07 100755
--- a/t/t5500-fetch-pack.sh
+++ b/t/t5500-fetch-pack.sh
@@ -31,7 +31,7 @@ add () {
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 c0baaa5..f55627b 100755
--- a/t/t6000lib.sh
+++ b/t/t6000lib.sh
@@ -49,13 +49,15 @@ as_author()
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
}
@@ -69,7 +71,8 @@ on_committer_date()
{
_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 96f3d35..b6e57b2 100755
--- a/t/t6010-merge-base.sh
+++ b/t/t6010-merge-base.sh
@@ -13,10 +13,11 @@ T=$(git write-tree)
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 1a7141e..2dcee7c 100755
--- a/t/t7004-tag.sh
+++ b/t/t7004-tag.sh
@@ -626,7 +626,8 @@ esac
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
diff --git a/t/t9500-gitweb-standalone-no-errors.sh b/t/t9500-gitweb-standalone-no-errors.sh
index 061a259..3dc261d 100755
--- a/t/t9500-gitweb-standalone-no-errors.sh
+++ b/t/t9500-gitweb-standalone-no-errors.sh
@@ -39,13 +39,15 @@ EOF
}
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:
--
1.5.5.1.128.g03a943
next prev parent reply other threads:[~2008-05-04 5:40 UTC|newest]
Thread overview: 60+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-09 1:29 [PATCH 0/8] Fix git's test suite to pass when the path contains spaces Bryan Donlan
2008-04-09 1:29 ` [PATCH 1/8] git-rebase.sh: Fix --merge --abort failures when path contains whitespace Bryan Donlan
2008-04-09 1:29 ` [PATCH 2/8] config.c: Escape backslashes in section names properly Bryan Donlan
2008-04-09 1:29 ` [PATCH 3/8] git-send-email.perl: Handle shell metacharacters in $EDITOR properly Bryan Donlan
2008-04-09 1:30 ` [PATCH 4/8] test-lib.sh: Fix some missing path quoting Bryan Donlan
2008-04-09 1:30 ` [PATCH 5/8] test-lib.sh: Add a test_set_editor function to safely set $VISUAL Bryan Donlan
2008-04-09 1:30 ` [PATCH 6/8] lib-git-svn.sh: Fix quoting issues with paths containing shell metacharacters Bryan Donlan
2008-04-09 1:30 ` [PATCH 7/8] Use test_set_editor in t9001-send-email.sh Bryan Donlan
2008-04-09 1:30 ` [PATCH 8/8] Fix tests breaking when checkout path contains shell metacharacters Bryan Donlan
[not found] ` <47FC69B8.40809@viscovery.net>
[not found] ` <20080410063028.GA12562@shion.is.fushizen.net>
2008-04-10 6:49 ` Johannes Sixt
2008-04-10 7:02 ` Bryan Donlan
2008-04-10 7:24 ` Junio C Hamano
2008-04-09 7:01 ` [PATCH 7/8] Use test_set_editor in t9001-send-email.sh Johannes Sixt
2008-04-09 14:16 ` Bryan Donlan
2008-04-09 6:50 ` [PATCH 6/8] lib-git-svn.sh: Fix quoting issues with paths containing shell metacharacters Junio C Hamano
2008-04-09 6:36 ` [PATCH 5/8] test-lib.sh: Add a test_set_editor function to safely set $VISUAL Johannes Sixt
2008-04-09 6:31 ` [PATCH 3/8] git-send-email.perl: Handle shell metacharacters in $EDITOR properly Johannes Sixt
2008-04-09 14:28 ` Bryan Donlan
2008-04-10 3:39 ` Junio C Hamano
2008-04-09 6:31 ` [PATCH 2/8] config.c: Escape backslashes in section names properly Johannes Sixt
2008-04-09 14:13 ` Bryan Donlan
2008-04-09 14:25 ` Johannes Sixt
2008-04-09 6:50 ` [PATCH 1/8] git-rebase.sh: Fix --merge --abort failures when path contains whitespace Junio C Hamano
2008-04-09 6:55 ` Johannes Sixt
2008-04-09 14:37 ` Bryan Donlan
2008-04-09 14:51 ` Johannes Sixt
2008-04-09 15:02 ` Bryan Donlan
2008-04-10 6:10 ` Johannes Sixt
2008-04-10 6:50 ` [PATCH v2 00/10] Fix git's test suite to pass when the path contains spaces Bryan Donlan
2008-04-10 6:50 ` [PATCH v2 01/10] git-rebase.sh: Fix --merge --abort failures when path contains whitespace Bryan Donlan
2008-04-10 6:50 ` [PATCH v2 02/10] config.c: Escape backslashes in section names properly Bryan Donlan
2008-04-10 6:50 ` [PATCH v2 03/10] git-send-email.perl: Handle shell metacharacters in $EDITOR properly Bryan Donlan
2008-04-10 6:50 ` [PATCH v2 04/10] test-lib.sh: Add a test_set_editor function to safely set $VISUAL Bryan Donlan
2008-04-10 6:50 ` [PATCH v2 05/10] Use test_set_editor in t9001-send-email.sh Bryan Donlan
2008-04-10 6:50 ` [PATCH v2 06/10] test-lib.sh: Fix some missing path quoting Bryan Donlan
2008-04-10 6:50 ` [PATCH v2 07/10] lib-git-svn.sh: Fix quoting issues with paths containing shell metacharacters Bryan Donlan
2008-04-10 6:50 ` [PATCH v2 08/10] Don't use the export NAME=value form in the test scripts Bryan Donlan
2008-04-10 6:50 ` [PATCH v2 09/10] Fix tests breaking when checkout path contains shell metacharacters Bryan Donlan
2008-04-10 6:50 ` [PATCH v2 10/10] Rename the test trash directory to contain " Bryan Donlan
2008-04-10 7:45 ` [PATCH v2 01/10] git-rebase.sh: Fix --merge --abort failures when path contains whitespace Junio C Hamano
2008-04-10 8:48 ` Bryan Donlan
2008-04-11 22:37 ` Junio C Hamano
2008-05-04 5:37 ` [PATCH v3 00/10] Fix git's test suite to pass when the path contains spaces Bryan Donlan
2008-05-04 5:37 ` [PATCH v3 01/10] git-rebase.sh: Fix --merge --abort failures when path contains whitespace Bryan Donlan
2008-05-04 5:37 ` [PATCH v3 02/10] config.c: Escape backslashes in section names properly Bryan Donlan
2008-05-04 5:37 ` [PATCH v3 03/10] git-send-email.perl: Handle shell metacharacters in $EDITOR properly Bryan Donlan
2008-05-04 5:37 ` [PATCH v3 04/10] test-lib.sh: Add a test_set_editor function to safely set $VISUAL Bryan Donlan
2008-05-04 5:37 ` [PATCH v3 05/10] Use test_set_editor in t9001-send-email.sh Bryan Donlan
2008-05-04 5:37 ` [PATCH v3 06/10] test-lib.sh: Fix some missing path quoting Bryan Donlan
2008-05-04 5:37 ` [PATCH v3 07/10] lib-git-svn.sh: Fix quoting issues with paths containing shell metacharacters Bryan Donlan
2008-05-04 5:37 ` Bryan Donlan [this message]
2008-05-04 5:37 ` [PATCH v3 09/10] Fix tests breaking when checkout path contains " Bryan Donlan
2008-05-04 5:38 ` [PATCH v3 10/10] Rename the test trash directory to contain spaces Bryan Donlan
2008-05-05 8:25 ` Johannes Sixt
2008-05-05 7:04 ` [PATCH v3 09/10] Fix tests breaking when checkout path contains shell metacharacters Johannes Sixt
2008-05-05 7:57 ` Bryan Donlan
2008-05-05 8:11 ` Johannes Sixt
2008-05-05 7:03 ` [PATCH v3 00/10] Fix git's test suite to pass when the path contains spaces Johannes Sixt
2008-05-05 7:59 ` Bryan Donlan
2008-05-05 8:19 ` Johannes Sixt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1209879480-16910-9-git-send-email-bdonlan@fushizen.net \
--to=bdonlan@fushizen.net \
--cc=aroben@apple.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=j.sixt@viscovery.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).