On Thu, Sep 04, 2025 at 08:19:59AM -0400, Derrick Stolee wrote: > 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