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
Taylor Blau <me@ttaylorr.com>
Date
Apr 28, 2020, 19:59 UTC
Message-ID
<20200428195957.GA45908@syl.local>
In-Reply-To
<xmqqzhav1kix.fsf@gitster.c.googlers.com>
On Tue, Apr 28, 2020 at 12:24:06PM -0700, Junio C Hamano wrote:
Show 24 quoted lines
> Christian Couder <christian.couder@gmail.com> writes:
>
> > From: SZEDER Gábor <szeder.dev@gmail.com>
> >
> > When the server has hung up after sending an ERR packet to the
> > client, the client might still be writing, for example a "done"
> > line. Therefore the client might get a write error before reading
> > the ERR packet.
> >
> > When fetching, this could result in the client displaying a
> > "Broken pipe" error, instead of the more useful error sent by
> > the server in the ERR packet.
>
> Hmm, if the connection gets severed just before the ERR packet the
> other side has written, we will see "Broken pipe" if we write
> "done", and no amount of "try to read to collect as much what they
> said as possible" would help.  If you are lucky and the connection
> is broken after the ERR reaches on this side, such an "extra effort"
> may help, but is it really worth the effort?  It is not clear to me
> if the extra complexity, one more API function people need to learn,
> and the need to think which one to use every time they want to say
> write_in_full(), are justifiable.
>
> I dunno.

I think that you're right. The more that I thought about my suggestion, the more dumb I was convinced that it was.

Sorry.

Thanks, Taylor

Previous: Junio C HamanoNext: Jeff King
Message 3 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.