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