git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christian Hesse <mail@eworm.de>
To: git@vger.kernel.org
Cc: Christian Hesse <mail@eworm.de>
Subject: [PATCH 1/1] tests: fix gzip with exported GZIP variable in environment
Date: Tue,  3 Dec 2013 09:57:34 +0100	[thread overview]
Message-ID: <1386061054-30796-1-git-send-email-mail@eworm.de> (raw)

In t/t5000-tar-tree.sh the variable GZIP is used for the command name.
From man gzip:

> The environment variable GZIP can hold a set of default options for
> gzip. These options are interpreted first and can be overwritten by
> explicit command line parameters.

So using any other variable name fixes this.
---
 t/t5000-tar-tree.sh | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/t/t5000-tar-tree.sh b/t/t5000-tar-tree.sh
index c2023b1..01b0ed9 100755
--- a/t/t5000-tar-tree.sh
+++ b/t/t5000-tar-tree.sh
@@ -25,7 +25,7 @@ commit id embedding:
 '
 
 . ./test-lib.sh
-GZIP=${GZIP:-gzip}
+GZIPCMD=${GZIPCMD:-gzip}
 GUNZIP=${GUNZIP:-gzip -d}
 
 SUBSTFORMAT=%H%n
@@ -275,27 +275,27 @@ test_expect_success 'only enabled filters are available remotely' '
 	test_cmp remote.bar config.bar
 '
 
-if $GZIP --version >/dev/null 2>&1; then
-	test_set_prereq GZIP
+if $GZIPCMD --version >/dev/null 2>&1; then
+	test_set_prereq GZIPCMD
 else
 	say "Skipping some tar.gz tests because gzip not found"
 fi
 
-test_expect_success GZIP 'git archive --format=tgz' '
+test_expect_success GZIPCMD 'git archive --format=tgz' '
 	git archive --format=tgz HEAD >j.tgz
 '
 
-test_expect_success GZIP 'git archive --format=tar.gz' '
+test_expect_success GZIPCMD 'git archive --format=tar.gz' '
 	git archive --format=tar.gz HEAD >j1.tar.gz &&
 	test_cmp j.tgz j1.tar.gz
 '
 
-test_expect_success GZIP 'infer tgz from .tgz filename' '
+test_expect_success GZIPCMD 'infer tgz from .tgz filename' '
 	git archive --output=j2.tgz HEAD &&
 	test_cmp j.tgz j2.tgz
 '
 
-test_expect_success GZIP 'infer tgz from .tar.gz filename' '
+test_expect_success GZIPCMD 'infer tgz from .tar.gz filename' '
 	git archive --output=j3.tar.gz HEAD &&
 	test_cmp j.tgz j3.tar.gz
 '
@@ -306,17 +306,17 @@ else
 	say "Skipping some tar.gz tests because gunzip was not found"
 fi
 
-test_expect_success GZIP,GUNZIP 'extract tgz file' '
+test_expect_success GZIPCMD,GUNZIP 'extract tgz file' '
 	$GUNZIP -c <j.tgz >j.tar &&
 	test_cmp b.tar j.tar
 '
 
-test_expect_success GZIP 'remote tar.gz is allowed by default' '
+test_expect_success GZIPCMD 'remote tar.gz is allowed by default' '
 	git archive --remote=. --format=tar.gz HEAD >remote.tar.gz &&
 	test_cmp j.tgz remote.tar.gz
 '
 
-test_expect_success GZIP 'remote tar.gz can be disabled' '
+test_expect_success GZIPCMD 'remote tar.gz can be disabled' '
 	git config tar.tar.gz.remote false &&
 	test_must_fail git archive --remote=. --format=tar.gz HEAD \
 		>remote.tar.gz
-- 
1.8.5

             reply	other threads:[~2013-12-03  9:05 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-03  8:57 Christian Hesse [this message]
2013-12-03  9:49 ` [PATCH 1/1] tests: fix gzip with exported GZIP variable in environment Eric Sunshine
2013-12-03 13:18   ` Jeff King
2013-12-03 13:21     ` [PATCH] t5000: simplify gzip prerequisite checks Jeff King
2013-12-03 18:21     ` [PATCH 1/1] tests: fix gzip with exported GZIP variable in environment Junio C Hamano
2013-12-04 19:32       ` Jeff King
2013-12-04 22:07         ` 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=1386061054-30796-1-git-send-email-mail@eworm.de \
    --to=mail@eworm.de \
    --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 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).