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:03 UTC
Message-ID
<20261031050337.GA1202343@coredump.intra.peff.net>
In-Reply-To
<xmqqwlqytvg9.fsf@gitster.g>
On Fri, Oct 30, 2026 at 08:12:06PM -0700, Junio C Hamano wrote:
Show 13 quoted lines
> Jeff King <peff@peff.net> writes:
> 
> > 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).

Show 7 quoted lines
> 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
Previous: Junio C HamanoNext: Junio C Hamano
Message 7 of 8 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
  8. 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.