git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: "Christian Couder" <christian.couder@gmail.com>,
	git@vger.kernel.org, "Taylor Blau" <me@ttaylorr.com>,
	"SZEDER Gábor" <szeder.dev@gmail.com>,
	"Derrick Stolee" <dstolee@microsoft.com>,
	"Christian Couder" <chriscool@tuxfamily.org>
Subject: Re: [PATCH v2] fetch-pack: try harder to read an ERR packet
Date: Tue, 28 Apr 2020 14:23:37 -0700	[thread overview]
Message-ID: <xmqqzhavz4me.fsf@gitster.c.googlers.com> (raw)
In-Reply-To: <20200428211736.GG4000@coredump.intra.peff.net> (Jeff King's message of "Tue, 28 Apr 2020 17:17:36 -0400")

Jeff King <peff@peff.net> writes:

>> 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.

      reply	other threads:[~2020-04-28 21:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-28  7:44 [PATCH v2] fetch-pack: try harder to read an ERR packet Christian Couder
2020-04-28 19:24 ` Junio C Hamano
2020-04-28 19:59   ` Taylor Blau
2020-04-28 20:51     ` Jeff King
2020-04-28 20:49   ` Jeff King
2020-04-28 21:02     ` Junio C Hamano
2020-04-28 21:17       ` Jeff King
2020-04-28 21:23         ` Junio C Hamano [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqzhavz4me.fsf@gitster.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=chriscool@tuxfamily.org \
    --cc=christian.couder@gmail.com \
    --cc=dstolee@microsoft.com \
    --cc=git@vger.kernel.org \
    --cc=me@ttaylorr.com \
    --cc=peff@peff.net \
    --cc=szeder.dev@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).