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

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

From
Todd Zullinger <tmz@pobox.com>
Date
Oct 31, 2026, 02:03 UTC
Message-ID
<20261031020318.tLesiElF@teonanacatl.net>
In-Reply-To
<20261031002550.GA626623@coredump.intra.peff.net>
Jeff King wrote:
Show 16 quoted lines
> A few tests in t5702 check whether we specify the v2 protocol via the
> GIT_PROTOCOL environment variable. They do this by redirecting the
> output of "env" into a file and grepping it. But our exact pattern
> depends on how env quotes its output. GNU coreutils 9.10 will output
> this:
> 
>   GIT_PROTOCOL=version=2
> 
> but version 9.12 will output this:
> 
>   GIT_PROTOCOL='version=2'
> 
> 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.

� https://github.com/coreutils/coreutils/blob/v9.12/NEWS#L118-L121
  I'd link to the main Savannah cgit or gitweb, but those
  are currently down, thanks to AI scraper bots. :(
Show 5 quoted lines
> ---
> The new coreutils hit Debian unstable, so I ran into this doing my usual
> daily "make test". I wondered what idiot did the overly-complicated
> "env" invocation in the first place, but naturally it turns out it was
> me.

Haha. I've had that experience as well. More often than I'd like. :)

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

-- 
Todd
Previous: Jeff KingNext: Jeff King
Message 2 of 7 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. Collin FunkOct 31, 2026
  6. Junio C HamanoOct 31, 2026
  7. Jeff KingOct 31, 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.