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

Re: [PATCH v2] fetch-pack: try harder to read an ERR packet

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 28, 2020, 21:23 UTC
Message-ID
<xmqqzhavz4me.fsf@gitster.c.googlers.com>
In-Reply-To
<20200428211736.GG4000@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 7 quoted lines
>> If the mechanism to do this were limited to the packet IO layer, it
>> may be more palatable, though.
>
> Agreed. There's not a single place where we write, though, since we
> often form packets in local buffers and then write() them out manually.
> So it does have to be sprinkled around fetch-pack.c. But certainly the
> damage can be limited to that client network code.

Yeah, I do not mind "sprinkling all over the place in client network code" at all. The ideal is if we never used write_in_full() and always used this "write but if we get a write error then check for ERR packet" helper consistently (which means we'd convert all the writes done in that layer, and by definition that may have to be "all over the place in the client networking code").

Thanks.
Previous: Jeff King
Message 8 of 8 in “fetch-pack: try harder to read an ERR packet”
  1. fetch-pack: try harder to read an ERR packetChristian Couder, Apr 28, 2020
  2. Junio C HamanoApr 28, 2020
  3. Taylor BlauApr 28, 2020
  4. Jeff KingApr 28, 2020
  5. Jeff KingApr 28, 2020
  6. Junio C HamanoApr 28, 2020
  7. Jeff KingApr 28, 2020
  8. Junio C HamanoApr 28, 2020

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.