git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Nguyen Thai Ngoc Duy" <pclouds@gmail.com>
To: "Shawn O. Pearce" <spearce@spearce.org>
Cc: "Git Mailing List" <git@vger.kernel.org>
Subject: Re: resumable git-clone?
Date: Wed, 8 Aug 2007 07:20:59 -0400	[thread overview]
Message-ID: <fcaeb9bf0708080420t192596f0kfabbaa5b058d49e5@mail.gmail.com> (raw)
In-Reply-To: <20070808035946.GP9527@spearce.org>

On 8/7/07, Shawn O. Pearce <spearce@spearce.org> wrote:
> 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 packfiles are organized to place commits at the front of the
> packfile.  So a truncated download will give the client a whole
> host of commits, like maybe all of them, but none of the trees
> or blobs associated with them as those come behind the commits.
> Worse, the commits are sorted most recent to least recent.  So if
> the client claims he has the very first commit he received, that
> is currently an assertion that he has the entire repository.

I'm thinking about things like bisect and use it to cut the history
into parts. Clients only use completed parts. Uncompleted parts are
thrown away. So if users think they cannot suffer too big packs, they
tell server to send smaller (and less efficient) packs. Anyway I don't
have deep knowledge of Git internals, my opion could be completely
wrong.
-- 
Duy

      parent reply	other threads:[~2007-08-08 11:21 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-07 13:23 resumable git-clone? Nguyen Thai Ngoc Duy
2007-08-08  3:59 ` Shawn O. Pearce
2007-08-08  9:14   ` Johannes Schindelin
2007-08-08 19:09     ` Junio C Hamano
2007-08-08 19:35       ` Johannes Schindelin
2007-08-09  0:01       ` [PATCH] allow git-bundle to create bottomless bundle Junio C Hamano
2007-08-09  0:28         ` Johannes Schindelin
2007-08-09  2:48         ` Mark Levedahl
2007-08-09  5:04           ` Junio C Hamano
2007-08-09 12:32             ` Mark Levedahl
2007-08-08 11:20   ` Nguyen Thai Ngoc Duy [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=fcaeb9bf0708080420t192596f0kfabbaa5b058d49e5@mail.gmail.com \
    --to=pclouds@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=spearce@spearce.org \
    /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).