From: "brian m. carlson" <sandals@crustytoothpaste.net>
To: Jeff King <peff@peff.net>
Cc: git@vger.kernel.org, Jonathan Tan <jonathantanmy@google.com>
Subject: Re: [PATCH] transport: don't flush when disconnecting stateless-rpc helper
Date: Wed, 8 Jan 2020 12:44:50 +0000 [thread overview]
Message-ID: <20200108124450.GO6570@camp.crustytoothpaste.net> (raw)
In-Reply-To: <20200108071009.GA1675456@coredump.intra.peff.net>
[-- Attachment #1: Type: text/plain, Size: 694 bytes --]
On 2020-01-08 at 07:10:09, Jeff King wrote:
> diff --git a/transport.c b/transport.c
> index 83379a037d..1fdc7dac1a 100644
> --- a/transport.c
> +++ b/transport.c
> @@ -737,7 +737,7 @@ static int disconnect_git(struct transport *transport)
> {
> struct git_transport_data *data = transport->data;
> if (data->conn) {
> - if (data->got_remote_heads)
> + if (data->got_remote_heads && !transport->stateless_rpc)
> packet_flush(data->fd[1]);
> close(data->fd[0]);
> close(data->fd[1]);
This is as simple and elegant as I'd hoped for, and as usual, it's well
explained. Looks great.
--
brian m. carlson: Houston, Texas, US
OpenPGP: https://keybase.io/bk2204
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 868 bytes --]
next prev parent reply other threads:[~2020-01-08 12:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-08 3:34 Extra request with protocol v2 and git ls-remote brian m. carlson
2020-01-08 7:10 ` [PATCH] transport: don't flush when disconnecting stateless-rpc helper Jeff King
2020-01-08 12:44 ` brian m. carlson [this message]
2020-01-08 13:43 ` Derrick Stolee
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=20200108124450.GO6570@camp.crustytoothpaste.net \
--to=sandals@crustytoothpaste.net \
--cc=git@vger.kernel.org \
--cc=jonathantanmy@google.com \
--cc=peff@peff.net \
/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).