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

Re: [PATCH] doc: filter-branch does not require re-export of vars

From
Jeff King <peff@peff.net>
Date
May 29, 2017, 04:58 UTC
Message-ID
<20170529045843.ynbsfrwnefoyxwrm@sigill.intra.peff.net>
In-Reply-To
<xmqqa85w8eym.fsf@gitster.mtv.corp.google.com>
On Mon, May 29, 2017 at 01:27:45PM +0900, Junio C Hamano wrote:
Show 15 quoted lines
> Samuel Lijin <sxlijin@gmail.com> writes:
> 
> >> However, I think POSIX mandates the behavior you'd expect. And the only
> >> shell I know that misbehaves in this way is Solaris /bin/sh, which we
> >> have already declared too broken to support.
> >
> > Off-topic, but where is this explicitly documented?
> 
> One link I had readily available was
> 
>   https://public-inbox.org/git/7vei5qtnc5.fsf@alter.siamese.dyndns.org/
> 
> but there may be older discussions that were the actual process of
> our officially having "written its /bin/sh off as broken and
> unusable" if you dig further in the list archive.

Ah, I had taken Samuel's question as "where is the POSIX behavior documented". :)

The link above is a good explanation of the $() problem on Solaris. It also doesn't do ${parameter#word}. I couldn't find a specific moment of outlawing that /bin/sh, but there are several mentions of problems with it going back to the beginning. Here's one from 2007:

  http://public-inbox.org/git/7vabt9sasl.fsf@assigned-by-dhcp.cox.net/
We had already given up on it by then.

I don't think there's anything in CodingGuidelines (though t/README does call it "broken"), though it explicitly endorses $(), which rules out Solaris /bin/sh.

I think we found in the last year or two that there are some old versions of ksh that don't like our scripts (definitely ksh88, and maybe ksh93?). Some light reading for the curious:

  http://public-inbox.org/git/CALR6jEhviK9KZxR6R6xzkZ5EAO-RjWj3xYah_DOSDXhEjYsT-A@mail.gmail.com/
  http://public-inbox.org/git/CALR6jEjWjJA0X2qXsxqObqc_yxrgX87LYf8cmJ0MmJFF6PkmTQ@mail.gmail.com/
  http://public-inbox.org/git/xmqqinxt3kwq.fsf@gitster.mtv.corp.google.com/

The problems are around backslash-escaping, signal exit codes, and doubled parentheses. There are some patches, but I think we decided not to pursue it (I couldn't find that exact decision, but it's referenced later on).

-Peff
Previous: Junio C Hamano
Message 7 of 7 in “doc: filter-branch does not require re-export of vars”
  1. doc: filter-branch does not require re-export of varsAndreas Heiduk, May 26, 2017
  2. Jeff KingMay 26, 2017
  3. Junio C HamanoMay 28, 2017
  4. Samuel LijinMay 29, 2017
  5. Jeff KingMay 29, 2017
  6. Junio C HamanoMay 29, 2017
  7. Jeff KingMay 29, 2017

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.