From: Todd Zullinger Date: Sat, 31 Oct 2026 02:03:18 GMT Subject: Re: [PATCH] t5702: be more resilient to env quoting Message-ID: <20261031020318.tLesiElF@teonanacatl.net> In-Reply-To: <20261031002550.GA626623@coredump.intra.peff.net> Jeff King wrote: > 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. :( > --- > 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