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

Re: [PATCH] fetch-pack: write fetched refs to .promisor

From
Jeff King <peff@peff.net>
Date
Sep 5, 2019, 17:59 UTC
Message-ID
<20190905175954.GB23663@sigill.intra.peff.net>
In-Reply-To
<xmqqpnker7ij.fsf@gitster-ct.c.googlers.com>
On Thu, Sep 05, 2019 at 10:13:24AM -0700, Junio C Hamano wrote:
Show 12 quoted lines
> Jeff King <peff@peff.net> 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
Previous: Junio C HamanoNext: Jonathan Tan
Message 6 of 12 in “fetch-pack: write fetched refs to .promisor”
  1. fetch-pack: write fetched refs to .promisorJonathan Tan, Aug 26, 2019
  2. Junio C HamanoAug 27, 2019
  3. Jonathan TanAug 27, 2019
  4. Jeff KingSep 5, 2019
  5. Junio C HamanoSep 5, 2019
  6. Jeff KingSep 5, 2019
  7. Jonathan TanSep 5, 2019
  8. Jeff KingOct 2, 2019
  9. Josh SteadmonOct 14, 2019
  10. Jonathan TanOct 14, 2019
  11. fetch-pack: write fetched refs to .promisorJonathan Tan, Oct 15, 2019
  12. Josh SteadmonOct 15, 2019

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.