From: Junio C Hamano <gitster@pobox•com>
To: Ben Walton <bdwalton@gmail•com>
Cc: peff@peff•net, git@vger•kernel.org
Subject: Re: [PATCH] Ensure SHELL_PATH is the hash bang for test suite askpass helper script.
Date: Mon, 29 Sep 2014 10:49:03 -0700 [thread overview]
Message-ID: <xmqq38bauxkg.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: 1411974127-5258-1-git-send-email-bdwalton@gmail.com
Ben Walton <bdwalton@gmail•com> writes:
> The askpass script that is created for use by the test suite should
> use SHELL_PATH for its hash bang instead of /bin/sh. Commit 5a4352024
> introduced the use of idioms not supported in some legacy /bin/sh
> implementations.
>
> Use write_script to ensure this happens automatically. This lets us
> remove the chmod step as well, since write_script handles that.
>
> Signed-off-by: Ben Walton <bdwalton@gmail•com>
> ---
I'll leave out the "some legacy shells we do not support want to use
`command`" from the justification of this change. Use of the
write_script helper is the right thing to do---$SHELL_PATH points at
the shell the user told us s/he wants to use, and that is a reason
enough for this change. The reason why the user wants to use that
shell is immaterial.
Thanks.
> t/lib-credential.sh | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/t/lib-credential.sh b/t/lib-credential.sh
> index 9e7d796..d8e41f7 100755
> --- a/t/lib-credential.sh
> +++ b/t/lib-credential.sh
> @@ -278,12 +278,10 @@ helper_test_timeout() {
> '
> }
>
> -cat >askpass <<\EOF
> -#!/bin/sh
> +write_script askpass <<\EOF
> echo >&2 askpass: $*
> what=$(echo $1 | cut -d" " -f1 | tr A-Z a-z | tr -cd a-z)
> echo "askpass-$what"
> EOF
> -chmod +x askpass
> GIT_ASKPASS="$PWD/askpass"
> export GIT_ASKPASS
prev parent reply other threads:[~2014-09-29 17:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-28 22:21 [PATCH] Use SHELL_PATH as hash bang in test suite askpass helper script Ben Walton
2014-09-28 23:14 ` Jeff King
2014-09-29 7:02 ` [PATCH] Ensure SHELL_PATH is the hash bang for " Ben Walton
2014-09-29 17:30 ` Jeff King
2014-09-29 17:49 ` Junio C Hamano [this message]
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=xmqq38bauxkg.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox$(echo .)com \
--cc=bdwalton@gmail$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
--cc=peff@peff$(echo .)net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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