git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Junio C Hamano <gitster@pobox.com>
Cc: Jeff King <peff@peff.net>,
	Michael J Gruber <git@drmicha.warpmail.net>,
	git@vger.kernel.org
Subject: Re: [PATCH] t9100: fix breakage when SHELL_PATH is not /bin/sh
Date: Tue, 9 Feb 2016 11:07:40 +0100 (CET)	[thread overview]
Message-ID: <alpine.DEB.2.20.1602091101250.2964@virtualbox> (raw)
In-Reply-To: <xmqqd1s77yhg.fsf@gitster.mtv.corp.google.com>

Hi Junio,

On Mon, 8 Feb 2016, Junio C Hamano wrote:

> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> 
> > write_script is a semantically unambiguous way to specify what we *want*.
> > And it would allow us to handle chmod specifically for Windows *in one
> > place only*.
> 
> Correct.  write_script, for the intended target of the helper, is a
> way to write a script that can later be invoked by the test with the
> name "$1".

And whose executable bit is set, contingent on the POSIXPERM prereq.

> It is conceivable for write_script on UNIX to be writing
> into "$1" while Windows version to be writing into "$1.bat"

Oy vey. Good thing you did not see my first reaction.

Shell scripts and batch scripts have *very* different semantics. Therefore
it would be a major nightmare (for me, not for you) to support writing
them *using the same write_script invocation*.

Let's just not go there.

> But the way the test uses this exec.sh script is not consistent with
> that.  exec.sh for this test is merely a data, whose content must
> exactly match what later tests expect, i.e. it wants it to begin with
> "#!/bin/sh" and its execute bit on, even though the test does not have
> no intention to run it as a script.

The important part, of course, is "and its execute bit on" which makes it
a moot point to ask whether we intend to execute the script or not. A
script is what we want, and a script is what we write. Therefore,
write_script is what we call. With the $2 fix-up to keep DrMicha happy.

Ciao,
Dscho

      reply	other threads:[~2016-02-09 10:08 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
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 [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=alpine.DEB.2.20.1602091101250.2964@virtualbox \
    --to=johannes.schindelin@gmx.de \
    --cc=git@drmicha.warpmail.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --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 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).