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

Re: Doing blobless clone by default; switching between blobless, treeless and full clones by a command

From
Patrick Steinhardt <ps@pks.im>
Date
Sep 5, 2025, 12:23 UTC
Message-ID
<aLrWUhtCqp1hMcQS@pks.im>
In-Reply-To
<7713256d-e258-4356-b303-128fdb417972@gmail.com>
On Thu, Sep 04, 2025 at 08:19:59AM -0400, Derrick Stolee wrote:
Show 14 quoted lines
> On 9/4/2025 5:41 AM, Kristoffer Haugsbakk wrote:
> > On Thu, Sep 4, 2025, at 11:33, Дилян Палаузов wrote:
> >> • add a git command to download all locally missing history, including 
> >> for treeless clones and blobless clones
> > 
> > This sounds like git-backfill(1).
> 
> Indeed, 'git backfill' is intended to assist with downloading the blobs
> that were not selected in a blobless partial clone. 
> > I’ve never used blob/treeless.
> 
> I don't believe that 'git backfill' is optimized for treeless clones.
> Treeless clones are not intended for "refilling" as downloading missing
> trees is particularly expensive.

Yeah, indeed. I guess we can tweak the way we backfill trees by batching by depth. E.g. we:

  1. Collect all root trees and fetch them in a batch.
  2. For each fetched tree, figure out all missing transitive trees and
     fetch that level.
  3. Repeat for the next-deeper level.

But that batching is definitely not ideal, and there's going to be cases where it performs _way_ worse compared to backfilling blobs. That's nothing we can really avoid though.

One idea would be that the remote tells us about all the trees we may have to fetch. But that information alone is not helpful unless we also have the links between trees, and as soon as we have that the info is basically interchangable with having the actual trees in the first place.

So in general, the recommendation I typically give is to not use treeless clones at all.

Patrick
Previous: Junio C HamanoNext: Derrick Stolee
Message 5 of 9 in “Doing blobless clone by default; switching between blobless, treeless and full clones by a command”
  1. Дилян ПалаузовSep 4, 2025
  2. Kristoffer HaugsbakkSep 4, 2025
  3. Derrick StoleeSep 4, 2025
  4. Junio C HamanoSep 4, 2025
  5. Patrick SteinhardtSep 5, 2025
  6. Derrick StoleeSep 5, 2025
  7. Patrick SteinhardtSep 5, 2025
  8. Konstantin RyabitsevSep 5, 2025
  9. Ben KnobleSep 7, 2025

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.