git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Michael J Gruber <git@drmicha.warpmail.net>
Cc: git@vger.kernel.org,
	Johannes Schindelin <johannes.schindelin@gmx.de>,
	Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH] t9100: fix breakage when SHELL_PATH is not /bin/sh
Date: Mon, 8 Feb 2016 11:37:00 -0500	[thread overview]
Message-ID: <20160208163700.GA22929@sigill.intra.peff.net> (raw)
In-Reply-To: <CAA19uiRSu_6Os3b498obSNec7b2uiYv20SZ=y93CkjsWqhqHzA@mail.gmail.com>

On Mon, Feb 08, 2016 at 05:27:30PM +0100, Michael J Gruber wrote:

> > I think this just re-breaks things on Windows. That first setup test
> > used "chmod +x" (which is brought back by your patch), without having
> > the POSIXPERM prerequisite.
> >
> > We probably do not want to mark the whole setup test as POSIXPERM, as
> > that would effectively break all of the other tests on Windows. The rest
> > of the tests need to be able to work whether or not the "chmod +x" was
> > run. It may be simpler to just break the executable-bit tests, including
> > setup, out to their own section of the script.
> >
> The commit message does not explain that part of the patch at all - to me
> it looks as if the direct "echo" and "chmod +x" is simply replaced
> by calling a function which does just that, or more exactly, not quite:

Ah, right. I figured that systems that don't handle `chmod +x` would
omit it from write_script(). But it looks like we don't. I guess the
logic is that on Windows "chmod +x" doesn't _complain_, it's simply a
noop for adding the file to the index (because we unset core.filemode).

So in that sense, Windows is fine with that setup either way.

I wondered why it would not later fail the same sha1 check, since "git
add" would not respect the executable bit on such a system. But the
answer is that we do not "git add" the result; we import it using svn,
and then convert that to a git tree.

> > That being said, t9100 seems to pass for me, even at bcb11f1. Can you
> > show us the breakage you are seeing?
> 
> SHELL_PATH=/bin/dash (in config.mak)
> 
> As I explained in my commit message, the problem arises when SHELL_PATH is
> not "/bin/sh" and, consequently,
> the generated "exec.sh" results in a blob with a different sha1.

Oh, of course. I forgot that my SHELL_PATH is in fact /bin/sh. Sorry for
being thick.

Assuming your patch works on Windows (and from the logic above, I think
it should be the case?), then I think it's a good solution.

-Peff

  parent reply	other threads:[~2016-02-08 16:37 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-07 19:11 [PATCH] t9100: fix breakage when SHELL_PATH is not /bin/sh Michael J Gruber
2016-02-08 13:50 ` Jeff King
2016-02-08 16:34   ` Michael J Gruber
     [not found]   ` <CAA19uiRSu_6Os3b498obSNec7b2uiYv20SZ=y93CkjsWqhqHzA@mail.gmail.com>
2016-02-08 16:37     ` Jeff King [this message]
2016-02-08 19:31       ` Johannes Schindelin
2016-02-08 19:35         ` Jeff King
2016-02-08 19:43           ` Junio C Hamano
2016-02-08 19:56             ` Jeff King
2016-02-09 10:00               ` Johannes Schindelin
2016-02-09 17:30                 ` Junio C Hamano
2016-02-08 19:59           ` Johannes Schindelin
2016-02-08 20:12             ` Junio C Hamano
2016-02-09 10:07               ` Johannes Schindelin

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=20160208163700.GA22929@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@drmicha.warpmail.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=johannes.schindelin@gmx.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).