From: Nguyen Thai Ngoc Duy <pclouds@gmail.com>
To: Elijah Newren <newren@gmail.com>
Cc: "Shawn O. Pearce" <spearce@spearce.org>, git <git@vger.kernel.org>
Subject: Re: Sparse clones (Was: Re: [PATCH 1/2] upload-pack: support subtree packing)
Date: Wed, 28 Jul 2010 13:36:47 +1000 [thread overview]
Message-ID: <AANLkTikvhi-Bm-eV9ZfjoZdugRpiCwg8n-TQ4oOVvC=G@mail.gmail.com> (raw)
In-Reply-To: <AANLkTikJhSVJw2hXkp0j6XA+k-J-AtSYzKWumjnqqsgz@mail.gmail.com>
2010/7/28 Elijah Newren <newren@gmail.com>:
> 1) A user controls sparseness by passing rev-list arguments to clone.
>
> This allows a user to control sparseness both in terms of span of
> content (files/directories) and depth of history. It can also be used
> to limit to a subset of refs (cloning just one or two branches instead
> of all branches and tags). For example,
> $ git clone ssh://repo.git dst -- Documentation/
Does pathspec is supported to in addition to prefix?
> $ git clone ssh://repo.git dst master~6..master
> $ git clone ssh://repo.git dst -3
> (Note that the destination argument becomes mandatory for those doing
> a sparse clone in order to disambiguate it from rev-list options.)
>
> This method also means users don't need much training to learn how to
> use sparse clones -- they just use syntax they've already learned with
> log, and clone will pass this info on to upload-pack.
>
> There is a slight question as to whether users should have to specify
> "--all HEAD" with all sparse clones or whether it should be assumed
> when no other refs are listed.
So you basically kill off shallow clone too, with "master~6..master".
I wonder what happens if user does "git clone ... master~6..master~3"?
> 4) All revision-walking operations automatically use these limiting args.
>
> This should be a simple code change, and would enable rev-list, log,
> etc. to avoid missing blobs/trees and thus enable them to work with
> sparse clones. fsck would take a bit more work, since it doesn't use
> the setup_revisions() and revision.h walking machinery, but shouldn't
> be too bad (I hope).
>
> There are also performance ramifications: There should be no
> measurable performance overhead for non-sparse clones (something that
> might be a problem with a different implementation that did
> does-this-exist check each time it references a blob). It should also
> be a significant performance boost for those using it, as operations
> will only need to deal with the subset of the repository they specify
> (faster downloads, stats, logs, etc.)
Revision walking is not the only gate to access objects. Others like
diff machinery needs also be taught about rev-list limits.
> 5) "Densifying" a sparse clone can be done
>
> One can fetch a new pack and replace the limiting rev-list args with
> the new choice. The sparse checkout information needs to be updated
> too.
>
> (So users probably would want to densify a sparse clone with "pull"
> rather than "fetch", as manually updating sparse checkouts may be a
> bit of a hassle.)
What information would you send to the server to request new pack in
sparse clone? Currently we send all commit tips. rev-list has a notion
to subtract commit trees. I don't know if it can "add" or "subtract"
tree prefix though.
--
Duy
next prev parent reply other threads:[~2010-07-28 3:36 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-28 0:13 Sparse clones (Was: Re: [PATCH 1/2] upload-pack: support subtree packing) Elijah Newren
2010-07-28 1:05 ` Avery Pennarun
2010-07-28 3:06 ` Nguyen Thai Ngoc Duy
2010-07-28 3:38 ` Nguyen Thai Ngoc Duy
2010-07-28 3:58 ` Avery Pennarun
2010-07-28 6:12 ` Sverre Rabbelier
2010-07-28 7:59 ` Nguyen Thai Ngoc Duy
2010-07-28 14:48 ` Sverre Rabbelier
2010-07-28 7:11 ` Nguyen Thai Ngoc Duy
2010-07-28 3:31 ` Elijah Newren
2010-07-31 22:36 ` Elijah Newren
2010-07-28 3:36 ` Nguyen Thai Ngoc Duy [this message]
2010-07-28 3:59 ` Elijah Newren
2010-07-29 10:29 ` Nguyen Thai Ngoc Duy
2010-08-13 17:31 ` Enrico Weigelt
2010-08-13 19:19 ` Truncating history (Re: Sparse clones) Jonathan Nieder
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='AANLkTikvhi-Bm-eV9ZfjoZdugRpiCwg8n-TQ4oOVvC=G@mail.gmail.com' \
--to=pclouds@gmail.com \
--cc=git@vger.kernel.org \
--cc=newren@gmail.com \
--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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).