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

Re: [PATCH] t5702: be more resilient to env quoting

From
Jeff King <peff@peff.net>
Date
Oct 31, 2026, 05:06 UTC
Message-ID
<20261031050638.GB1202343@coredump.intra.peff.net>
In-Reply-To
<20261031020318.tLesiElF@teonanacatl.net>
On Fri, Oct 30, 2026 at 10:03:18PM -0400, Todd Zullinger wrote:
Show 13 quoted lines
> > It doesn't quote every variable, but the presence of "=" now triggers
> > it. We could loosen our regex to accommodate both versions, but there's
> > a simpler fix. We only care about the value of one variable, so we can
> > just print it using the shell invoked for the server-side command.
> 
> Per the coreutils-9.12 NEWS¹, it now honors "the
> QUOTING_STYLE environment variable, defaulting to
> shell-escape style."
> 
> Not that I think we should keep the env parsing; as you note
> there are some pros to replacing it anyway.  But if we want
> to use env somewhere else, we can set QUOTING_STYLE=literal
> to get the unquoted values too.

Heh, I started to wonder if there might be such an option, but then realized we were probably better without it. But thank you for (as usual) filling my brain with more Unix esoterica. You never know when it will later come in handy. :)

> I didn't properly review or test your changes, though they
> do _look_ sane at a glance (albeit a quick Friday night
> glance).

Thanks. The thing I most worried about was messing up the quoting of "$" in the embedded shell command, since otherwise we expand $GIT_PROTOCOL in the outer layer. And as it would obviously be empty there, that would give a false pass to the tests that are expecting it to be empty (but you can see from the upload-pack one that we do get it right).

This is a case where using an "<<EOT" here-doc might make things easier, but I stopped short.

-Peff
Previous: Todd ZullingerNext: Collin Funk
Message 3 of 9 in “t5702: be more resilient to env quoting”
  1. t5702: be more resilient to env quotingJeff King, Oct 31, 2026
  2. Todd ZullingerOct 31, 2026
  3. Jeff KingOct 31, 2026
  4. Collin FunkOct 31, 2026
  5. Jeff KingNov 4, 2026
  6. Collin FunkOct 31, 2026
  7. Junio C HamanoOct 31, 2026
  8. Jeff KingOct 31, 2026
  9. Junio C HamanoNov 1, 2026

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.