Re: [RFC PATCH] Reduce the number of connects when fetching
From: Junio C Hamano <hidden>
Date: 2016-06-15 22:43:47
Daniel Barkalow [off-list ref] writes:
On Mon, 5 Nov 2007, Junio C Hamano wrote:quoted
The upload-pack protocol goes "S: here are what I have, C: I want these, C: I have these, S: ok, continue, C: I have these, S: ok, continue, C: I have these, S: ok, I've heard enough, C: done, S: packfile is here", so after packfile generation starts there is nothing further the downloader can say. Otherwise you would be able to do the tag following using the same connection, but that is unfortunately not a case.It would be nice if this could continue...
You would need a protocol extension for this, as the protocol defines all the remainder after the have-ack exchange to be intended for unpack-objects, not just the data for a single pack that immediately follows the exchange. Mysteriously, unpack-objects even has code to write out the remainder after the pack data. The protocol extension would probably need to depend on the existence of sideband. Make the sending side signal the end of the pack data over the sideband after sending a pack, and then both sides can go back to the "C: I want these too, S: Ok, here it is" exchange. You may optionally want to do another have-ack exchange here, but for the purpose of tag following I suspect there is no need for that.