Subject: [PATCH 0/2] Subtree clone?

From: Nguyễn Thái Ngọc Duy <[email-masked]>
Date: Tue, 27 Jul 2010 06:36:08 +0700

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