git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* Extra request with protocol v2 and git ls-remote
@ 2020-01-08  3:34 brian m. carlson
  2020-01-08  7:10 ` [PATCH] transport: don't flush when disconnecting stateless-rpc helper Jeff King
  0 siblings, 1 reply; 4+ messages in thread
From: brian m. carlson @ 2020-01-08  3:34 UTC (permalink / raw)
  To: git; +Cc: Jonathan Tan

[-- Attachment #1: Type: text/plain, Size: 751 bytes --]

A colleague (Jon Simons) today pointed out an interesting behavior of
git ls-remote with protocol v2: it makes a second POST request and sends
only a flush packet.  This can be demonstrated with the following:

  GIT_CURL_VERBOSE=1 git -c protocol.version=2 ls-remote origin

The Content-Length header on the second request will be exactly 4 bytes.

I'm not sure exactly how to fix this by looking at remote-curl.c, but I
suspect that we can avoid sending a request if all we're going to do is
send a flush packet.  If I were a bit more familiar with the code, I'd
send a patch, but I'm not.

I just thought I'd point this out since it was surprising to me.
-- 
brian m. carlson: Houston, Texas, US
OpenPGP: https://keybase.io/bk2204

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 868 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-01-08 13:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2020-01-08 13:43   ` Derrick Stolee

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).