From: Junio C Hamano Date: Wed, 16 May 2007 00:38:34 GMT Subject: Re: Smart fetch via HTTP? Message-ID: <7vlkfphab9.fsf@assigned-by-dhcp.cox.net> In-Reply-To: <20070515232946.GR3141@spearce.org> "Shawn O. Pearce" writes: > Jan Hudec wrote: >> Did anyone already think about fetching over HTTP working similarly to the >> native git protocol? > > No work has been done on this (that I know of) but I've discussed > it to some extent with Simon 'corecode' Schubert on #git, and I > think he also brought it up on the mailing list not too long after. > > I've certainly thought about adding some sort of pack-objects > frontend into gitweb.cgi for this exact purpose. It is really > quite easy, except for the negotation of what the client has. ;-) > >> Than a question is how to implement it. The current protocol is stateful on >> both sides, but the stateless nature of HTTP more or less requires the >> protocol to be stateless on the server. >> >> I think it would be possible to use basically the same protocol as now, but >> make it stateless for server. That is server first sends it's heads and than >> client repeatedly sends all it's wants and some haves until the server acks >> all of them and sends the pack. > > I think Simon was talking about doubling the number of haves the > client sends in each request. So the client POSTs initially all > of its current refs; then current refs and their parents; then 4 > commits back, then 8, etc. The server replies to each POST request > with either a "send more please" or the packfile. I kinda' like the bundle suggestion ;-)