From: Jakub Narebski <jnareb@gmail.com>
To: Sitaram Chamarty <sitaramc@gmail.com>
Cc: Nicolas Pitre <nico@cam.org>,
Tomasz Kontusz <roverorna@gmail.com>, git <git@vger.kernel.org>
Subject: Re: Continue git clone after interruption
Date: Wed, 19 Aug 2009 11:53:33 +0200 [thread overview]
Message-ID: <200908191153.36006.jnareb@gmail.com> (raw)
In-Reply-To: <2e24e5b90908182142n16201ed4ua41408878664e353@mail.gmail.com>
On Wed, Aug 19, 2009, Sitaram Chamarty wrote:
> On Wed, Aug 19, 2009 at 12:15 AM, Jakub Narebski<jnareb@gmail.com> wrote:
> > There is another way which we can go to implement resumable clone.
> > Let's git first try to clone whole repository (single pack; BTW what
> > happens if this pack is larger than file size limit for given
> > filesystem?). If it fails, client ask first for first half of of
> > repository (half as in bisect, but it is server that has to calculate
> > it). If it downloads, it will ask server for the rest of repository.
> > If it fails, it would reduce size in half again, and ask about 1/4 of
> > repository in packfile first.
>
> How about an extension where the user can *ask* for a clone of a
> particular HEAD to be sent to him as a git bundle? Or particular
> revisions (say once a week) were kept as a single file git-bundle,
> made available over HTTP -- easily restartable with byte-range -- and
> anyone who has bandwidth problems first gets that, then changes the
> origin remote URL and does a "pull" to get uptodate?
>
> I've done this manually a few times when sneakernet bandwidth was
> better than the normal kind, heh, but it seems to me the lowest impact
> solution.
>
> Yes you'd need some extra space on the server, but you keep only one
> bundle, and maybe replace it every week by cron. Should work fine
> right now, as is, with a wee bit of manual work by the user, and a
> quick cron entry on the server
This is a good idea, i think, and it can be implemented with various
amount of effort and changes to git, and various amount of seamless
integration.
1. Simplest solution: social (homepage). Not integrated at all.
On projects homepage, the one where there is described where project
repository is and how to get it, you add a link to most recent bundle
(perhaps in addition to most recent snapshot). This bundle would be
served as a static file via HTTP (and perhaps also FTP) by (any) web
server that supports resuming (range requests). Or you can make
server generate bundles on demand, only when they are first requested.
Most recent might mean latest tagged release, or it might mean daily
snapshot^W bundle.
This solution could be integrated into gitweb, either by generic
'latest bundle' link in project's README.html (or in site's
GITWEB_HOMETEXT, default indextext.html), or by having gitweb
generate those links (and perhaps bundles as well) by itself.
2. Seamless solution: 'bundle' or 'bundles' capability. Requires
changes to both server and client.
If server supports (advertises) 'bundle' capability, it can serve
list of bundles (as HTTP / FTP / rsync URLs) either at client request,
or after (or before) list of refs if client requests 'bundle'
capability.
If client has support for 'bundles' capability, it terminates
connection to sshd or git-daemon, and does ordinary resumable HTTP
fetch using libcurl. After bundle is downloaded fully, it clones
from bundle, and does git-fetch with the same server as before,
which would then have less to transfer. Client has also to handle
situation where bundle download is interrupted, and do not do cleanup,
allowing for "git clone --continue".
3. Seamless solution: GitTorrent or its simplification: git mirror-sync.
I think that GitTorrent (see http://git.or.cz/gitwiki/SoC2009Ideas)
or even its simplification git-mirror-sync would include restartable
cloning. It is even among its intended features. Also this would
help to download faster via mirrors which can have faster and better
network connection.
But this would be most work.
You can implement solution 1. even now...
--
Jakub Narebski
Poland
prev parent reply other threads:[~2009-08-19 9:53 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-17 11:42 Continue git clone after interruption Tomasz Kontusz
2009-08-17 12:31 ` Johannes Schindelin
2009-08-17 15:23 ` Shawn O. Pearce
2009-08-18 5:43 ` Matthieu Moy
2009-08-18 6:58 ` Tomasz Kontusz
2009-08-18 17:56 ` Nicolas Pitre
2009-08-18 18:45 ` Jakub Narebski
2009-08-18 20:01 ` Nicolas Pitre
2009-08-18 21:02 ` Jakub Narebski
2009-08-18 21:32 ` Nicolas Pitre
2009-08-19 15:19 ` Jakub Narebski
2009-08-19 19:04 ` Nicolas Pitre
2009-08-19 19:42 ` Jakub Narebski
2009-08-19 21:13 ` Nicolas Pitre
2009-08-20 0:26 ` Sam Vilain
2009-08-20 7:37 ` Jakub Narebski
2009-08-20 7:48 ` Nguyen Thai Ngoc Duy
2009-08-20 8:23 ` Jakub Narebski
2009-08-20 18:41 ` Nicolas Pitre
2009-08-21 10:07 ` Jakub Narebski
2009-08-21 10:26 ` Matthieu Moy
2009-08-21 21:07 ` Nicolas Pitre
2009-08-21 21:41 ` Jakub Narebski
2009-08-22 0:59 ` Nicolas Pitre
2009-08-21 23:07 ` Sam Vilain
2009-08-22 3:37 ` Nicolas Pitre
2009-08-22 5:50 ` Sam Vilain
2009-08-22 8:13 ` Nicolas Pitre
2009-08-23 10:37 ` Sam Vilain
2009-08-20 22:57 ` Sam Vilain
2009-08-18 22:28 ` Johannes Schindelin
2009-08-18 23:40 ` Nicolas Pitre
2009-08-19 7:35 ` Johannes Schindelin
2009-08-19 8:25 ` Nguyen Thai Ngoc Duy
2009-08-19 9:52 ` Johannes Schindelin
2009-08-19 17:21 ` Nicolas Pitre
2009-08-19 22:23 ` René Scharfe
2009-08-19 4:42 ` Sitaram Chamarty
2009-08-19 9:53 ` Jakub Narebski [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200908191153.36006.jnareb@gmail.com \
--to=jnareb@gmail.com \
--cc=git@vger.kernel.org \
--cc=nico@cam.org \
--cc=roverorna@gmail.com \
--cc=sitaramc@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).