git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 0/2] Subtree clone?

From
Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Date
Jul 26, 2010, 23:36 UTC
Message-ID
<1280187370-23675-1-git-send-email-pclouds@gmail.com>

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(-)
Next: Nguyễn Thái Ngọc Duy
Message 1 of 10 in “Subtree clone?”
  1. 0/2 Subtree clone?Nguyễn Thái Ngọc Duy, Jul 26, 2010
  2. 1/2 upload-pack: support subtree packingNguyễn Thái Ngọc Duy, Jul 26, 2010
  3. Ævar Arnfjörð BjarmasonJul 27, 2010
  4. Shawn O. PearceJul 27, 2010
  5. Configurable callbacks for missing objects (we Re: upload-pack: support subtree packing)Avery Pennarun, Jul 27, 2010
  6. Nguyen Thai Ngoc DuyJul 27, 2010
  7. Elijah NewrenJul 28, 2010
  8. Avery PennarunJul 28, 2010
  9. Nguyen Thai Ngoc DuyJul 27, 2010
  10. 2/2 fetch-pack: support --subtree and --commit-subtree optionsNguyễn Thái Ngọc Duy, Jul 26, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.