summaryrefslogtreecommitdiffstats
path: root/transport.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2020-01-23 00:07:32 +0100
committerJunio C Hamano <gitster@pobox.com>2020-01-23 00:07:32 +0100
commit45f47ff01d048d47f30e0a5cacb5c5768d4858be (patch)
tree29aeaa81b832925fbdc9a2117b6080df6b83f0c9 /transport.c
parentMerge branch 'hw/tutorial-favor-switch-over-checkout' (diff)
parenttransport: don't flush when disconnecting stateless-rpc helper (diff)
downloadgit-45f47ff01d048d47f30e0a5cacb5c5768d4858be.tar.xz
git-45f47ff01d048d47f30e0a5cacb5c5768d4858be.zip
Merge branch 'jk/no-flush-upon-disconnecting-slrpc-transport'
Reduce unnecessary round-trip when running "ls-remote" over the stateless RPC mechanism. * jk/no-flush-upon-disconnecting-slrpc-transport: transport: don't flush when disconnecting stateless-rpc helper
Diffstat (limited to 'transport.c')
-rw-r--r--transport.c2
1 files changed, 1 insertions, 1 deletions
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]);