Re: [PATCH] t5702: be more resilient to env quoting
flat view
From: Jeff King <hidden>
Date: 2026-10-31 05:06:40
On Fri, Oct 30, 2026 at 10:03:18PM -0400, Todd Zullinger wrote:
quoted
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