Re: Smart fetch via HTTP?
- From
Shawn O. Pearce <spearce@spearce.org>
- Date
- May 15, 2007, 23:29 UTC
- Message-ID
- <20070515232946.GR3141@spearce.org>
- In-Reply-To
- <20070515201006.GD3653@efreet.light.src>
Jan Hudec <bulb@ucw.cz> 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. ;-)
Show 8 quoted lines
> 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.
-- Shawn.