git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: "Tom G. Christensen" <tgc@jupiterrise.com>
Cc: Elia Pinto <gitter.spiros@gmail.com>,
	Junio C Hamano <gitster@pobox.com>,
	git@vger.kernel.org
Subject: Re: Hardcoded #!/bin/sh in t5532 causes problems on Solaris
Date: Sat, 9 Apr 2016 18:37:39 -0400	[thread overview]
Message-ID: <20160409223738.GA1738@sigill.intra.peff.net> (raw)
In-Reply-To: <57098259.1060608@jupiterrise.com>

On Sun, Apr 10, 2016 at 12:29:45AM +0200, Tom G. Christensen wrote:

> On 09/04/16 23:04, Jeff King wrote:
> >I did some quick grepping around, and I suspect you may run
> >into the same thing in other places (e.g., t3404.40 looks
> >like a similar case).
> 
> There are only a few tests that fail and just t5532.3 seems affected by this
> issue.

Hmm. t3404.40 does this:

        echo "#!/bin/sh" > $PRE_COMMIT &&
	echo "test -z \"\$(git diff --cached --check)\"" >>$PRE_COMMIT &&
	chmod a+x $PRE_COMMIT &&

So I'm pretty sure that $PRE_COMMIT script should be barfing each time
it is called on Solaris. I think the test itself doesn't notice because
"/bin/sh barfed" and "the pre-commit check said no" look the same from
git's perspective (both non-zero exits), and we test only cases where we
expect the hook to fail.

I think that particular test could simplify its pre-commit hook to just
"exit 1".

I didn't dig into any other cases, so that might be the only one. If
you're not seeing problems, I'm not inclined to explore each one
manually.

> I applied this to 2.8.1 and as expected the test now passes on Solaris.

Thanks.

-Peff

  reply	other threads:[~2016-04-09 22:38 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-09 20:27 Hardcoded #!/bin/sh in t5532 causes problems on Solaris Tom G. Christensen
2016-04-09 21:04 ` Jeff King
2016-04-09 22:29   ` Tom G. Christensen
2016-04-09 22:37     ` Jeff King [this message]
2016-04-10  0:37       ` Junio C Hamano
2016-04-10 19:01         ` Junio C Hamano
2016-04-10 21:51           ` Eric Sunshine
2016-04-11 16:42             ` Junio C Hamano
2016-04-11 17:27           ` Jeff King
2016-04-11 17:32         ` Jeff King
2016-04-12 16:58           ` Junio C Hamano
2016-04-12 17:12             ` Junio C Hamano
2016-04-12 17:23               ` Jeff King
2016-04-12 17:22             ` Jeff King

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=20160409223738.GA1738@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=gitter.spiros@gmail.com \
    --cc=tgc@jupiterrise.com \
    /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).