Re: [PATCH] t5702: be more resilient to env quoting
flat view
From: Jeff King <hidden>
Date: 2026-10-31 05:03:39
On Fri, Oct 30, 2026 at 08:12:06PM -0700, Junio C Hamano wrote:
Jeff King [off-list ref] writes:quoted
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.Namely, in eaa0fd6584 (git_connect(): fix corner cases in downgrading v2 to v0, 2023-03-17). The log message starts by discussing dropping a "push" that asks for v2 to v0 because we can only do v2 for fetches, but the three tests added by the patch verify that fetch, push, and archive invoked via a custom path do not request v2.
I think you're misreading one of the tests. The one for fetch checks
that we _do_ send version=2 in the $GIT_PROTOCOL field. The others
confirm that we don't (the idea was to cover all of the possible
operations).
I can see that the patch correctly checks the value of '$GIT_PROTOCOL' in the environment when these custom commands are invoked. I would have to read the log message for the "head-scratching notes" in eaa0fd6584 if I wanted to remind myself why the original code wanted to downgrade a custom upload-pack to v0 in the first place. Luckily, I do not have to do that to be convinced that this particular patch is correct.
Yes, I don't think digging into the esoterica of eaa0fd6584 is worth
your time. But knowing that it is confirming upload-pack as v2 might
make it easier (and hopefully it is clear that this new patch retains
that behavior in its "expect").
-Peff