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

Re: [PATCH] transport: don't flush when disconnecting stateless-rpc helper

From
brian m. carlson <sandals@crustytoothpaste.net>
Date
Jan 8, 2020, 12:44 UTC
Message-ID
<20200108124450.GO6570@camp.crustytoothpaste.net>
In-Reply-To
<20200108071009.GA1675456@coredump.intra.peff.net>
On 2020-01-08 at 07:10:09, Jeff King wrote:
Show 13 quoted lines
> 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
Previous: Jeff KingNext: Derrick Stolee
Message 3 of 4 in “Extra request with protocol v2 and git ls-remote”
  1. brian m. carlsonJan 8, 2020
  2. transport: don't flush when disconnecting stateless-rpc helperJeff King, Jan 8, 2020
  3. brian m. carlsonJan 8, 2020
  4. Derrick StoleeJan 8, 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.