git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Sixt <j6t@kdbg.org>
To: Jeff King <peff@peff.net>
Cc: "Torsten Bögershausen" <tboegi@web.de>,
	"Lars Schneider" <larsxschneider@gmail.com>,
	"Junio C Hamano" <gitster@pobox.com>,
	git@vger.kernel.org
Subject: Re: [PATCH 2/4] t0021: put $TEST_ROOT in $PATH
Date: Thu, 3 Nov 2016 21:40:01 +0100	[thread overview]
Message-ID: <d36d8b51-f2d7-a2f5-89ea-369f49556e10@kdbg.org> (raw)
In-Reply-To: <20161102181824.mi6lmfnfckvrav7n@sigill.intra.peff.net>

Am 02.11.2016 um 19:18 schrieb Jeff King:
> We create a rot13.sh script in the trash directory, but need
> to call it by its full path when we have moved our cwd to
> another directory. Let's just put $TEST_ROOT in our $PATH so
> that the script is always found.
> 
> This is a minor convenience for rot13.sh, but will be a
> major one when we switch rot13-filter.pl to a script in the
> same directory, as it means we will not have to deal with
> shell quoting inside the filter-process config.
> 
> Signed-off-by: Jeff King <peff@peff.net>
> ---
>  t/t0021-conversion.sh | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/t/t0021-conversion.sh b/t/t0021-conversion.sh
> index dfde22549..c1ad20c61 100755
> --- a/t/t0021-conversion.sh
> +++ b/t/t0021-conversion.sh
> @@ -5,6 +5,7 @@ test_description='blob conversion via gitattributes'
>  . ./test-lib.sh
>  
>  TEST_ROOT="$(pwd)"
> +PATH=$TEST_ROOT:$PATH

This causes problems on Windows. We need the following squashed in.

---- 8< ----
[PATCH] squash! t0021: put $TEST_ROOT in $PATH

We have to use $PWD instead of $(pwd) because on Windows the
latter would add a C: style path to bash's Unix-style $PATH
variable, which becomes confused by the colon after the
drive letter. ($PWD is a Unix-style path.)

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
---
 t/t0021-conversion.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/t/t0021-conversion.sh b/t/t0021-conversion.sh
index 4e4b9a6be3..cff2b7259d 100755
--- a/t/t0021-conversion.sh
+++ b/t/t0021-conversion.sh
@@ -4,7 +4,7 @@ test_description='blob conversion via gitattributes'
 
 . ./test-lib.sh
 
-TEST_ROOT="$(pwd)"
+TEST_ROOT="$PWD"
 PATH=$TEST_ROOT:$PATH
 
 write_script <<\EOF "$TEST_ROOT/rot13.sh"
-- 
2.11.0.rc0.55.gd967357


  reply	other threads:[~2016-11-03 20:40 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-31 21:49 What's cooking in git.git (Oct 2016, #09; Mon, 31) Junio C Hamano
2016-11-02  7:16 ` Torsten Bögershausen
2016-11-02 12:55   ` Junio C Hamano
2016-11-02  9:57 ` Johannes Schindelin
2016-11-02 12:57   ` Junio C Hamano
2016-11-02 17:04 ` Torsten Bögershausen
2016-11-02 17:40   ` Jeff King
2016-11-02 18:16     ` [PATCH 0/4] t0021 perl portability fixups Jeff King
2016-11-02 18:17       ` [PATCH 1/4] t0021: use write_script to create rot13 shell script Jeff King
2016-11-06 14:25         ` Lars Schneider
2016-11-06 14:29           ` Jeff King
2016-11-06 14:43             ` Lars Schneider
2016-11-02 18:18       ` [PATCH 2/4] t0021: put $TEST_ROOT in $PATH Jeff King
2016-11-03 20:40         ` Johannes Sixt [this message]
2016-11-03 20:44           ` Jeff King
2016-11-03 21:09             ` Johannes Sixt
2016-11-06 14:29         ` Lars Schneider
2016-11-02 18:20       ` [PATCH 3/4] t0021: use $PERL_PATH for rot13-filter.pl Jeff King
2016-11-06 14:52         ` Lars Schneider
2016-11-06 14:54           ` Jeff King
2016-11-02 18:23       ` [PATCH 4/4] t0021: fix filehandle usage on older perl Jeff King
2016-11-02 20:54         ` Torsten Bögershausen
2016-11-06 14:55         ` Lars Schneider
2016-11-02 17:43   ` What's cooking in git.git (Oct 2016, #09; Mon, 31) Johannes Sixt
2016-11-03 14:21     ` Lars Schneider
2016-11-02 17:44   ` Lars Schneider
     [not found]     ` <CAG2PGspq34wn2bAGyhR6B-XmmayadmL-v3_65y5LJWTWNHXkOQ@mail.gmail.com>
2016-11-05  7:27       ` Torsten Bögershausen
2016-11-05  7:42 ` Torsten Bögershausen
2016-11-08  8:12 ` Karthik Nayak
     [not found]   ` <CA+P7+xo+CJU_ng5OWX1y26+=QPCg6Zxpv_0opTAzsNqeFXAwng@mail.gmail.com>
2016-11-08  9:03     ` Karthik Nayak

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=d36d8b51-f2d7-a2f5-89ea-369f49556e10@kdbg.org \
    --to=j6t@kdbg.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=larsxschneider@gmail.com \
    --cc=peff@peff.net \
    --cc=tboegi@web.de \
    /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).