git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] t9100: fix breakage when SHELL_PATH is not /bin/sh

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Feb 9, 2016, 10:07 UTC
Message-ID
<alpine.DEB.2.20.1602091101250.2964@virtualbox>
In-Reply-To
<xmqqd1s77yhg.fsf@gitster.mtv.corp.google.com>
Hi Junio,
On Mon, 8 Feb 2016, Junio C Hamano wrote:
Show 9 quoted lines
> 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.
Show 5 quoted lines
> 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

Previous: Junio C Hamano
Message 13 of 13 in “t9100: fix breakage when SHELL_PATH is not /bin/sh”
  1. t9100: fix breakage when SHELL_PATH is not /bin/shMichael J Gruber, Feb 7, 2016
  2. Jeff KingFeb 8, 2016
  3. Michael J GruberFeb 8, 2016
  4. Jeff KingFeb 8, 2016
  5. Johannes SchindelinFeb 8, 2016
  6. Jeff KingFeb 8, 2016
  7. Junio C HamanoFeb 8, 2016
  8. Jeff KingFeb 8, 2016
  9. Johannes SchindelinFeb 9, 2016
  10. Junio C HamanoFeb 9, 2016
  11. Johannes SchindelinFeb 8, 2016
  12. Junio C HamanoFeb 8, 2016
  13. Johannes SchindelinFeb 9, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.