On Thu, Sep 05, 2019 at 10:13:24AM -0700, Junio C Hamano wrote: > Jeff King <peff@xxxxxxxx> writes: > > > But I wonder if it would make sense to keep a cache of these "cut > > points" in the partial clone. That's potentially smaller than the > > complete set of objects (especially for tree-based partial cloning), and > > it seems clear we're willing to store it in memory anyway. > > That sounds in line with how "shallow" gives us cut points in the > history, but then would we end up listing a handful of cut-point > objects for each and every commit in the history? That still may be > a lot cheaper than computing the same set of cut-point objects every > time, though. I think it would be one set of cut points for the whole pack. There would potentially be a lot of overlap between commits (e.g., if you omit blob X, then every commit after it was added, even if it doesn't touch it, mentions X in its tree). It would also make sense to omit objects from the list that are actually in the pack (because we can trivially already know they're promisor objects by finding them in the pack's .idx). Which means that in the case of blob filters, the set of cut points is identical to the set of omitted objects (because blobs can't reference other objects). For a sparse-path filter that omits a whole tree like "!/foo", we'd end up with a list of all of the oids in history that were ever at the "foo" entry, but nothing below that. -Peff