From: Junio C Hamano <gitster@pobox.com>
To: git@vger.kernel.org
Subject: [PATCH] *.sh: drop useless use of "env"
Date: Thu, 06 Mar 2014 15:20:17 -0800 [thread overview]
Message-ID: <xmqq1tyex6by.fsf@gitster.dls.corp.google.com> (raw)
In a bourne shell script, "VAR=VAL command" is sufficient to run
'command' with environment variable VAR set to value VAL without
affecting the environment of the shell itself; there is no reason to
say "env VAR=VAL command".
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
* Just something I noticed while reading existing tests...
t/t1020-subdirectory.sh | 2 +-
t/t9001-send-email.sh | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/t/t1020-subdirectory.sh b/t/t1020-subdirectory.sh
index 1e2945e..6902320 100755
--- a/t/t1020-subdirectory.sh
+++ b/t/t1020-subdirectory.sh
@@ -148,7 +148,7 @@ test_expect_success 'GIT_PREFIX for built-ins' '
(
cd dir &&
printf "change" >two &&
- env GIT_EXTERNAL_DIFF=./diff git diff >../actual
+ GIT_EXTERNAL_DIFF=./diff git diff >../actual
git checkout -- two
) &&
test_cmp expect actual
diff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh
index 3119c8c..1ecdacb 100755
--- a/t/t9001-send-email.sh
+++ b/t/t9001-send-email.sh
@@ -409,7 +409,7 @@ test_expect_success $PREREQ 'Valid In-Reply-To when prompting' '
(echo "From Example <from@example.com>"
echo "To Example <to@example.com>"
echo ""
- ) | env GIT_SEND_EMAIL_NOTTY=1 git send-email \
+ ) | GIT_SEND_EMAIL_NOTTY=1 git send-email \
--smtp-server="$(pwd)/fake.sendmail" \
$patches 2>errors &&
! grep "^In-Reply-To: < *>" msgtxt1
next reply other threads:[~2014-03-06 23:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-06 23:20 Junio C Hamano [this message]
2014-03-07 1:14 ` [micro] Use 'env' on test_must_fail as appropriate 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=xmqq1tyex6by.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.