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

Re: [PATCH v2 00/16] First class shallow clone

From
Philip Oakley <philipoakley@iee.org>
Date
Jul 23, 2013, 22:33 UTC
Message-ID
<8BDFF5EEBDC8422681F1AB2C0A153CC6@PhilipOakley>
In-Reply-To
<CACsJy8AJjXMATEPrAgSYOgpZcR_khC=9S28H8LuCvuTuJk0x8w@mail.gmail.com>
From: "Duy Nguyen" <pclouds@gmail.com>
Sent: Tuesday, July 23, 2013 2:20 AM
Show 18 quoted lines
> On Tue, Jul 23, 2013 at 6:41 AM, Philip Oakley <philipoakley@iee.org> 
> wrote:
>> From: "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
>> Subject: [PATCH v2 00/16] First class shallow clone
>>
>> It's nice to see that shallow can be a first class clone.
>>
>> Thinking outside the box, does this infrastructure offer the 
>> opportunity to
>> maybe add a date based depth option that would establish the shallow
>> watermark based on date rather than count. (e.g. the "deepen" SP 
>> depth could
>
> I've been carefully avoiding the deepen issues because, as you see,
> it's complicated. But no, this series does not enable or disable new
> deeepen mechanisms. They can always be added as protocol extensions.
> Still thinking if it's worth exposing a (restricted form of) rev-list
> to the protocol..
Interesting idea.
Show 22 quoted lines
>
>> have an alternate with a leading 'T' to indicate a time limit ratherv 
>> than
>> revision count - I'm expecting such a format would be an error for 
>> existing
>> servers).
>>
>> My other thought was this style of cut limit list may also allow a 
>> big file
>> limit to do a similar process of listing objects (e.g. blobs) that 
>> are
>> size-shallow in the repo, though it maybe a long list on some repos, 
>> or with
>> a small size limit.
>
> This one, on the other hand, changes the "shape" of the repo (now with
> holes) and might need to go through the same process we do with this
> series. Maybe we should prepare for it now. Do you have a use case for
> size-based filtering? What can we do with a repo with some arbitrary
> blobs missing? Another form of this is narrow clone, where we cut by
> paths, not by blob size. Narrow clone sounds more useful to me because
> it's easier to control what we leave out.

In some sense a project with a sub-module is a narrow clone, split at a 'commit' object. There have been comments on the git-user list about the problem of accidental adding of large files which then make the repo's foot print pretty large as one use case [Git is consuming very much RAM]. The bigFileThreshold being one way of spotting such files as separate objects, and 'trimming' them.

It doesn't feel right to 'track files and directories` as paths for doing a narrow clone - it'd probably fall into the same trap as tracking file renames. However if one tracks trees and blobs (as a list of sha1 values, possibly with their source path) then it should it should be possible to allow work on the repo with those empty directories/files in the same manner as is used for sub-modules, possibly with some form of git-link file as an alternate marker.

The thought process is to map sub-module working onto the other object types (blobs and trees). The user would be unable to edit the trimmed files/directories anyway, so its sha1 value can't change, allowing it to be included in the next commit in the branch series.

Philip
> --
> Duy
> --
Previous: Duy NguyenNext: Duy Nguyen
Message 39 of 44 in “First class shallow clone”
  1. 0/7 First class shallow cloneNguyễn Thái Ngọc Duy, Jul 17, 2013
  2. 1/7 transport.h: remove send_pack prototype, already defined in send-pack.hNguyễn Thái Ngọc Duy, Jul 17, 2013
  3. 2/7 {receive,upload}-pack: advertise shallow graft informationNguyễn Thái Ngọc Duy, Jul 17, 2013
  4. 3/7 connect.c: teach get_remote_heads to parse "shallow" linesNguyễn Thái Ngọc Duy, Jul 17, 2013
  5. Junio C HamanoJul 20, 2013
  6. 4/7 Move setup_alternate_shallow and write_shallow_commits to shallow.cNguyễn Thái Ngọc Duy, Jul 17, 2013
  7. 5/7 fetch-pack: support fetching from a shallow repositoryNguyễn Thái Ngọc Duy, Jul 17, 2013
  8. Junio C HamanoJul 20, 2013
  9. 6/7 {send,receive}-pack: support pushing from a shallow cloneNguyễn Thái Ngọc Duy, Jul 17, 2013
  10. 7/7 send-pack: support pushing to a shallow cloneNguyễn Thái Ngọc Duy, Jul 17, 2013
  11. 00/16 First class shallow cloneNguyễn Thái Ngọc Duy, Jul 20, 2013
  12. 01/16 send-pack: forbid pushing from a shallow repositoryNguyễn Thái Ngọc Duy, Jul 20, 2013
  13. 02/16 {receive,upload}-pack: advertise shallow graft informationNguyễn Thái Ngọc Duy, Jul 20, 2013
  14. 03/16 connect.c: teach get_remote_heads to parse "shallow" linesNguyễn Thái Ngọc Duy, Jul 20, 2013
  15. 04/16 Move setup_alternate_shallow and write_shallow_commits to shallow.cNguyễn Thái Ngọc Duy, Jul 20, 2013
  16. 05/16 fetch-pack: support fetching from a shallow repositoryNguyễn Thái Ngọc Duy, Jul 20, 2013
  17. Philip OakleyJul 22, 2013
  18. Duy NguyenJul 23, 2013
  19. Duy NguyenJul 23, 2013
  20. 06/16 {send,receive}-pack: support pushing from a shallow cloneNguyễn Thái Ngọc Duy, Jul 20, 2013
  21. 07/16 send-pack: support pushing to a shallow cloneNguyễn Thái Ngọc Duy, Jul 20, 2013
  22. 08/16 upload-pack: let pack-objects do the object counting in shallow caseNguyễn Thái Ngọc Duy, Jul 20, 2013
  23. 09/16 pack-protocol.txt: a bit about smart httpNguyễn Thái Ngọc Duy, Jul 20, 2013
  24. 10/16 Add document for command arguments for supporting smart httpNguyễn Thái Ngọc Duy, Jul 20, 2013
  25. 11/16 {fetch,upload}-pack: support fetching from a shallow clone via smart httpNguyễn Thái Ngọc Duy, Jul 20, 2013
  26. 12/16 receive-pack: support pushing to a shallow clone via httpNguyễn Thái Ngọc Duy, Jul 20, 2013
  27. 13/16 send-pack: support pushing from a shallow clone via httpNguyễn Thái Ngọc Duy, Jul 20, 2013
  28. 14/16 git-clone.txt: remove shallow clone limitationsNguyễn Thái Ngọc Duy, Jul 20, 2013
  29. 15/16 config: add core.noshallow to prevent turning a repo into a shallow oneNguyễn Thái Ngọc Duy, Jul 20, 2013
  30. Philip OakleyJul 22, 2013
  31. Duy NguyenJul 23, 2013
  32. Junio C HamanoJul 23, 2013
  33. Philip OakleyJul 23, 2013
  34. 16/16 clone: use git protocol for cloning shallow repo locallyNguyễn Thái Ngọc Duy, Jul 20, 2013
  35. Philip OakleyJul 22, 2013
  36. Duy NguyenJul 23, 2013
  37. Junio C HamanoJul 23, 2013
  38. Duy NguyenJul 23, 2013
  39. Philip OakleyJul 23, 2013
  40. Duy NguyenJul 24, 2013
  41. Philip OakleyJul 24, 2013
  42. Piotr KrukowieckiJul 24, 2013
  43. Duy NguyenJul 24, 2013
  44. Piotr KrukowieckiJul 24, 2013

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.