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

Re: resumable git-clone?

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Aug 8, 2007, 09:14 UTC
Message-ID
<Pine.LNX.4.64.0708081012110.14781@racer.site>
In-Reply-To
<20070808035946.GP9527@spearce.org>
Hi,
On Tue, 7 Aug 2007, Shawn O. Pearce wrote:
Show 12 quoted lines
> Nguyen Thai Ngoc Duy <pclouds@gmail.com> wrote:
> > I was on a crappy connection and it was frustrated seeing git-clone
> > reached 80% then failed, then started over again. Can we support
> > resumable git-clone at some level? I think we could split into several
> > small packs, keep fetched ones, just get missing packs until we have
> > all.
> 
> This is uh, difficult over the native git protocol.  The problem
> is the native protocol negotiates what the client already has and
> what it needs by comparing sets of commits.  If the client says
> "I have commit X" then the server assumes it has not only commit
> X _but also every object reachable from it_.

Now here is a thought: after an interrupted fetch, you could do a (possibly expensive) analysis what commits are dangling, but do not contain broken links in their _complete_ history. Then mark them as (temporary) refs.

Another possibility should be to start with a shallow clone, and to deepen it. However, IIRC there have been complaints that that does not work, and it was not my itch, so I did not come around to scratch it.

Ciao, Dscho

Previous: Shawn O. PearceNext: Junio C Hamano
Message 3 of 11 in “resumable git-clone?”
  1. Nguyen Thai Ngoc DuyAug 7, 2007
  2. Shawn O. PearceAug 8, 2007
  3. Johannes SchindelinAug 8, 2007
  4. Junio C HamanoAug 8, 2007
  5. Johannes SchindelinAug 8, 2007
  6. allow git-bundle to create bottomless bundleJunio C Hamano, Aug 9, 2007
  7. Johannes SchindelinAug 9, 2007
  8. Mark LevedahlAug 9, 2007
  9. Junio C HamanoAug 9, 2007
  10. Mark LevedahlAug 9, 2007
  11. Nguyen Thai Ngoc DuyAug 8, 2007

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.