From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: Ben Walton <bwalton@artsci.utoronto.ca>, git@vger.kernel.org
Subject: Re: [PATCH 2/2] t0300: use write_script helper
Date: Fri, 03 Feb 2012 22:58:06 -0800 [thread overview]
Message-ID: <7vd39vjda9.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <20120204063018.GB21559@sigill.intra.peff.net> (Jeff King's message of "Sat, 4 Feb 2012 01:30:18 -0500")
Jeff King <peff@peff.net> writes:
> t0300 creates some helper shell scripts, and marks them with
> "!/bin/sh". Even though the scripts are fairly simple, they
> can fail on broken shells (specifically, Solaris /bin/sh
> will persist a temporary assignment to IFS in a "read"
> command).
>
> Rather than work around the problem for Solaris /bin/sh,
> using write_script will make sure we point to a known-good
> shell that the user has given us.
>
> Signed-off-by: Jeff King <peff@peff.net>
> ---
> This works fine on my Linux box, but just to sanity check that I didn't
> screw anything up in the whopping 5 lines of changes, can you confirm
> this fixes the issue for you, Ben?
>
> t/t0300-credentials.sh | 6 ++----
> 1 files changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/t/t0300-credentials.sh b/t/t0300-credentials.sh
> index 885af8f..0b46248 100755
> --- a/t/t0300-credentials.sh
> +++ b/t/t0300-credentials.sh
> @@ -14,14 +14,13 @@ test_expect_success 'setup helper scripts' '
> done
> EOF
>
> - cat >git-credential-useless <<-\EOF &&
> + write_script git-credential-useless <<-\EOF &&
> #!/bin/sh
An innocuous facepalm I'd be glad to remove myself ;-)
> . ./dump
> exit 0
> EOF
> - chmod +x git-credential-useless &&
>
> - cat >git-credential-verbatim <<-\EOF &&
> + write_script git-credential-verbatim <<-\EOF &&
> #!/bin/sh
But other than that, looks good.
> user=$1; shift
> pass=$1; shift
> @@ -29,7 +28,6 @@ test_expect_success 'setup helper scripts' '
> test -z "$user" || echo username=$user
> test -z "$pass" || echo password=$pass
> EOF
> - chmod +x git-credential-verbatim &&
>
> PATH="$PWD:$PATH"
> '
next prev parent reply other threads:[~2012-02-04 6:58 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-02 19:32 [PATCH] t0300-credentials: Word around a solaris /bin/sh bug Ben Walton
2012-02-02 19:44 ` Frans Klaver
2012-02-02 19:48 ` Ben Walton
2012-02-02 20:02 ` Jeff King
2012-02-03 1:02 ` Junio C Hamano
2012-02-03 12:06 ` Jeff King
2012-02-03 13:45 ` Ben Walton
2012-02-03 20:32 ` Junio C Hamano
2012-02-03 21:26 ` Jeff King
2012-02-03 21:50 ` Junio C Hamano
2012-02-03 21:55 ` Jeff King
2012-02-03 22:00 ` Ben Walton
2012-02-03 22:45 ` Junio C Hamano
2012-02-03 23:27 ` Jeff King
2012-02-04 6:27 ` Jeff King
2012-02-04 6:29 ` [PATCH 1/2] tests: add write_script helper function Jeff King
2012-02-04 6:30 ` [PATCH 2/2] t0300: use write_script helper Jeff King
2012-02-04 6:58 ` Junio C Hamano [this message]
2012-02-04 7:00 ` Jeff King
2012-02-02 20:16 ` [PATCH] t0300-credentials: Word around a solaris /bin/sh bug Jonathan Nieder
2012-02-02 20:43 ` Matthieu Moy
2012-02-02 21:11 ` Jonathan Nieder
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=7vd39vjda9.fsf@alter.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=bwalton@artsci.utoronto.ca \
--cc=git@vger.kernel.org \
--cc=peff@peff.net \
/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.