From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: git@vger.kernel.org
Cc: "Junio C Hamano" <gitster@pobox.com>,
"Pat Thoyts" <patthoyts@users.sourceforge.net>,
"Tarmigan Casebolt" <tarmigan+git@gmail.com>,
"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Subject: [PATCH] t/t5560: use `X=Y && export X' not `export X=Y'
Date: Thu, 7 Oct 2010 07:47:14 +0000 [thread overview]
Message-ID: <1286437634-12593-1-git-send-email-avarab@gmail.com> (raw)
Change t/t5560-http-backend-noserver.sh to use the `X=Y && export X'
style instead of `export X=Y'. The latter doesn't work on all POSIX
shells.
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
t/t5560-http-backend-noserver.sh | 17 ++++++++++++-----
1 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/t/t5560-http-backend-noserver.sh b/t/t5560-http-backend-noserver.sh
index 406432e..effe797 100755
--- a/t/t5560-http-backend-noserver.sh
+++ b/t/t5560-http-backend-noserver.sh
@@ -5,7 +5,11 @@ test_description='test git-http-backend-noserver'
HTTPD_DOCUMENT_ROOT_PATH="$TRASH_DIRECTORY"
-test_have_prereq MINGW && export GREP_OPTIONS=-U
+if test_have_prereq MINGW
+then
+ GREP_OPTIONS=-U
+ export GREP_OPTIONS
+fi
run_backend() {
echo "$2" |
@@ -15,7 +19,8 @@ run_backend() {
}
GET() {
- export REQUEST_METHOD="GET" &&
+ REQUEST_METHOD="GET" &&
+ export REQUEST_METHOD &&
run_backend "/repo.git/$1" &&
unset REQUEST_METHOD &&
if ! grep "Status" act.out >act
@@ -27,8 +32,9 @@ GET() {
}
POST() {
- export REQUEST_METHOD="POST" &&
- export CONTENT_TYPE="application/x-$1-request" &&
+ REQUEST_METHOD="POST" &&
+ CONTENT_TYPE="application/x-$1-request" &&
+ export REQUEST_METHOD CONTENT_TYPE &&
run_backend "/repo.git/$1" "$2" &&
unset REQUEST_METHOD &&
unset CONTENT_TYPE &&
@@ -47,7 +53,8 @@ log_div() {
. "$TEST_DIRECTORY"/t556x_common
expect_aliased() {
- export REQUEST_METHOD="GET" &&
+ REQUEST_METHOD="GET" &&
+ export REQUEST_METHOD &&
if test $1 = 0; then
run_backend "$2"
else
--
1.7.3.1.50.g1e633
next reply other threads:[~2010-10-07 7:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-07 7:47 Ævar Arnfjörð Bjarmason [this message]
2010-10-07 7:55 ` [PATCH] t/t5560: use `X=Y && export X' not `export X=Y' Matthieu Moy
2010-10-07 8:09 ` Ævar Arnfjörð Bjarmason
2010-10-10 17:20 ` Clemens Buchacher
2010-10-13 18:36 ` Junio C Hamano
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=1286437634-12593-1-git-send-email-avarab@gmail.com \
--to=avarab@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=patthoyts@users.sourceforge.net \
--cc=tarmigan+git@gmail.com \
/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).