git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] Subtree clone?
@ 2010-07-26 23:36 Nguyễn Thái Ngọc Duy
  2010-07-26 23:36 ` [PATCH 1/2] upload-pack: support subtree packing Nguyễn Thái Ngọc Duy
  2010-07-26 23:36 ` [PATCH 2/2] fetch-pack: support --subtree and --commit-subtree options Nguyễn Thái Ngọc Duy
  0 siblings, 2 replies; 10+ messages in thread
From: Nguyễn Thái Ngọc Duy @ 2010-07-26 23:36 UTC (permalink / raw)
  To: git; +Cc: Nguyễn Thái Ngọc Duy

This idea sounds quite nice to me. That is, instead of modifying git
core to support narrow/partial clone, {upload,fetch}-pack is modified
to give clients enough objects of so it can reconstruct a valid tree.
Users are free to do whatever they want on that tree. When they want to
push changes back, Git client creates proper commit/tree objects and
push.

The two patches in this series allow git to send objects of a subtree
to client, or just a barebone subtree without blobs. The client can
rewrite commits and throw the old commits.

I don't want to add much computation to server side, subtree looks
like a good fit (i.e. simply prefixcmp). Sparse checkout can then be
used to shape worktree if subtree is not good enough.

All the hard work is at client side, and git-subtree is a good
candidate. Well, the idea is inspired by recent discussions of
git-subtree vs git-submodule anyway.

Lazy clone does something similar. However lazy clone requires
connectivity to upstream. Lazy clone also exposes a security issue,
allowing client to get any object it wants.

Comments?

Nguyễn Thái Ngọc Duy (2):
  upload-pack: support subtree packing
  fetch-pack: support --subtree and --commit-subtree options

 builtin/fetch-pack.c |   15 +++++++++++++++
 upload-pack.c        |   31 ++++++++++++++++++++++++++++++-
 2 files changed, 45 insertions(+), 1 deletions(-)

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2010-07-28  2:01 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-26 23:36 [PATCH 0/2] Subtree clone? Nguyễn Thái Ngọc Duy
2010-07-26 23:36 ` [PATCH 1/2] upload-pack: support subtree packing Nguyễn Thái Ngọc Duy
2010-07-27 13:15   ` Ævar Arnfjörð Bjarmason
2010-07-27 14:46   ` Shawn O. Pearce
2010-07-27 18:51     ` Configurable callbacks for missing objects (we Re: upload-pack: support subtree packing) Avery Pennarun
2010-07-27 22:32       ` Nguyen Thai Ngoc Duy
2010-07-28  1:53       ` Elijah Newren
2010-07-28  2:00         ` Avery Pennarun
2010-07-27 22:29     ` [PATCH 1/2] upload-pack: support subtree packing Nguyen Thai Ngoc Duy
2010-07-26 23:36 ` [PATCH 2/2] fetch-pack: support --subtree and --commit-subtree options Nguyễn Thái Ngọc Duy

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).