git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git over webdav: what can I do for improving http-push ?

From
Martin Langhoff <martin.langhoff@gmail.com>
Date
Jan 3, 2008, 23:54 UTC
Message-ID
<46a038f90801031554j6218f08cl6c9608b24e1675f8@mail.gmail.com>
In-Reply-To
<20080103211521.GA4225@efreet.light.src>
On Jan 4, 2008 10:15 AM, Jan Hudec <bulb@ucw.cz> wrote:
> Now to keep it stateless, I thought that:
...
> This would guarantee, that when you want n revisions, you make at most
> log2(n) requests and get at most 2*n revisions (well, the requests are for
That is still a lot! How about, for each ref
 - Client sends a POST listing the ref and the latest related commit
it has that the server is likely to have (from origin/heads/<ref>).
Optionally, it can provide a blacklist of <treeish> (where every
object refered is known) and blob sha1s.
 - Server sends the new sha1 of the ref, and a thin pack that covers the changes
 - The client can disconnect to stop the transaction. For example --
if it sees the sha1 of a huge object that it already has. It can
re-request, with a blacklist.

A good number of objects will be sent unnecesarily - with no option to the client to say "I have this" - but by using the hint of letting the server know we have origin/heads/<ref> I suspect that it will be minimal.

Also:
 - It will probably be useful to list all the refs the client knows
from that server in the request.
 - If the ref has changed with a non-fast-forward, the server needs to
say so, and provide a listing of the commits. As soon as the client
spots a common commit, it can close the connection -- it now knows
what ref to tell the server about in a subsequent command.

This way, you ideally have 1 request per ref, 2 if it has been rebased/rewound. This can probably get reorganised to do several refs in one request.

cheers,
m
Previous: Grégoire BarbierNext: Jan Hudec
Message 13 of 14 in “git over webdav: what can I do for improving http-push ?”
  1. Grégoire BarbierDec 30, 2007
  2. Daniel BarkalowDec 31, 2007
  3. Graham BarrDec 31, 2007
  4. Jan HudecJan 1, 2008
  5. Grégoire BarbierJan 1, 2008
  6. Jakub NarebskiJan 1, 2008
  7. Jan HudecJan 1, 2008
  8. Grégoire BarbierJan 3, 2008
  9. Jan HudecJan 3, 2008
  10. Linus TorvaldsJan 3, 2008
  11. Jakub NarebskiJan 3, 2008
  12. Grégoire BarbierJan 3, 2008
  13. Martin LanghoffJan 3, 2008
  14. Jan HudecJan 4, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.