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

Re: [PATCH] test-lib: simplify '--option=value' parsing

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 22, 2016, 20:54 UTC
Message-ID
<xmqq1t5xpdnk.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<20160422183703.GA7595@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
> For some reason I had always assumed that complicated pattern matching
> with "#" was non-POSIX, but I checked and it is definitely in there.

No, the offending code really dates back to the days back when I was writing most of the shell scripts (or others were mostly copying from what I have written). I had this irrational aversion against variable substitutions that are beyond ${var-default}, ${var=assign} and ${var+isset}.

The conversion looks fine (modulo one missed one you noticed).
Thanks for cleaning things up.
Previous: SZEDER Gábor
Message 4 of 4 in “test-lib: simplify '--option=value' parsing”
  1. test-lib: simplify '--option=value' parsingSZEDER Gábor, Apr 22, 2016
  2. Jeff KingApr 22, 2016
  3. test-lib: simplify '--option=value' parsingSZEDER Gábor, Apr 22, 2016
  4. Junio C HamanoApr 22, 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.