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

Re: [RFC PATCH] Not computing changed path filter for root commits

From
Taylor Blau <me@ttaylorr.com>
Date
Sep 19, 2023, 18:21 UTC
Message-ID
<ZQnmwID4PNlB5ME0@nand.local>
In-Reply-To
<20230911223157.446269-1-jonathantanmy@google.com>
On Mon, Sep 11, 2023 at 03:31:56PM -0700, Jonathan Tan wrote:
Show 9 quoted lines
> SZEDER Gábor suggested [2] that we change the revision walk to read
> changed path filters also for root commits, but I don't think that's
> possible - we have to tie reading changed path filters to when we read
> trees, and right now, we don't seem to read trees when evaluating root
> commits (rev_compare_tree() in revision.c is in the only code path that
> uses changed path filters, and it itself is only called per-parent and
> thus not called for root commits). The alternative is to not generate
> changed path filters for root commits (or what I did in this patch,
> which is to generate an all-1 filter), which seems reasonable to me.

I think between the two, the all-1's filter is the more sensible choice, since not computing a filter is typically reserved for blowing past the `commitGraph.maxNewFilters` setting.

But, I agree with Gábor down-thread that we could instead teach `rev_same_tree_as_empty()` to be aware of Bloom filters, which I think would accomplish our goal of reading Bloom filters at the root commit while not having to tweak their generation.

Thanks, Taylor

Previous: Taylor Blau
Message 10 of 10 in “Not computing changed path filter for root commits”
  1. Not computing changed path filter for root commitsJonathan Tan, Sep 11, 2023
  2. Junio C HamanoSep 15, 2023
  3. SZEDER GáborSep 15, 2023
  4. Taylor BlauSep 19, 2023
  5. Jonathan TanOct 2, 2023
  6. Taylor BlauOct 9, 2023
  7. Taylor BlauOct 9, 2023
  8. Jonathan TanOct 9, 2023
  9. Taylor BlauOct 10, 2023
  10. Taylor BlauSep 19, 2023

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.