git/list[1] front-page[2] threads[3] people[4] search[5] about
wed 2026-10-07 16:51 UTC

Re: [PATCH v4 4/6] revision: add Bloom check that includes parent directories

From
Patrick Steinhardt <ps@pks.im>
Date
Sep 10, 2026, 07:04 UTC
Message-ID
<aqJWasW9IKXhjfd7@pks.im>
In-Reply-To
<20260901-toon-speed-up-last-modified-v4-4-a09949800404@iotcl.com>
On Tue, Sep 01, 2026 at 11:10:24AM +0200, Toon Claes wrote:
Show 10 quoted lines
> diff --git a/revision.c b/revision.c
> index ed46b90b00..a560146b4d 100644
> --- a/revision.c
> +++ b/revision.c
> @@ -789,6 +789,21 @@ bool revs_maybe_changed_in_bloom(struct rev_info *revs,
>  	return false;
>  }
>  
> +bool revs_maybe_changed_in_bloom_with_parents(struct rev_info *revs,
> +					      struct bloom_filter *filter)

In "revision.c", "parents" would immediately read as "commit parent" to me. Would `revs_maybe_changed_in_bloom_with_leading_dirs()` be a better name to clarify that this is about directories, only?

Show 29 quoted lines
> +{
> +	if (!revs->bloom_keyvecs_nr || !filter)
> +		return true;
> +
> +	for (size_t nr = 0; nr < revs->bloom_keyvecs_nr; nr++)
> +		if (bloom_filter_contains_any_vec(filter,
> +						  revs->bloom_keyvecs[nr],
> +						  revs->bloom_filter_settings))
> +			return true;
> +
> +	return false;
> +}
> +
>  static int rev_compare_tree(struct rev_info *revs,
>  			    struct commit *parent, struct commit *commit, int nth_parent)
>  {
> diff --git a/revision.h b/revision.h
> index 67778558e1..192001ff79 100644
> --- a/revision.h
> +++ b/revision.h
> @@ -507,6 +507,14 @@ int prepare_revision_walk(struct rev_info *revs);
>  bool revs_maybe_changed_in_bloom(struct rev_info *revs,
>  				 struct bloom_filter *filter);
>  
> +/**
> + * Same as revs_maybe_changed_in_bloom(), but a change to any of the directories
> + * leading up to a path counts as well. Callers that track the tree entries
> + * containing the paths, and not just the paths themselves, need this.
> + */

This comment also talks about leading directories, not parent directories.

> +bool revs_maybe_changed_in_bloom_with_parents(struct rev_info *revs,
> +					      struct bloom_filter *filter);
> +
Patrick
Previous: Patrick SteinhardtNext: Patrick Steinhardt
Message 20 of 22 in “revision: move bloom keyvec precondition into function”
  1. 1/6 revision: move bloom keyvec precondition into functionToon Claes, Aug 31, 2026
  2. 2/6 revision: expose check for paths maybe changed in Bloom filterToon Claes, Aug 31, 2026
  3. 0/6 last-modified: use the pathspec's Bloom key to pre-filter commitsToon Claes, Aug 31, 2026
  4. 3/6 bloom: add helper to check if any key in a vector is presentToon Claes, Aug 31, 2026
  5. 4/6 revision: add Bloom check that includes parent directoriesToon Claes, Aug 31, 2026
  6. 5/6 last-modified: check pathspec against Bloom filter firstToon Claes, Aug 31, 2026
  7. 6/6 last-modified: keep per-path Bloom filters for wildcard pathspecsToon Claes, Aug 31, 2026
  8. Junio C HamanoAug 31, 2026
  9. Junio C HamanoSep 1, 2026
  10. Toon ClaesSep 1, 2026
  11. 0/6 last-modified: use the pathspec's Bloom key to pre-filter commitsToon Claes, Sep 1, 2026
  12. 1/6 revision: move bloom keyvec precondition into functionToon Claes, Sep 1, 2026
  13. 2/6 revision: expose check for paths maybe changed in Bloom filterToon Claes, Sep 1, 2026
  14. 3/6 bloom: add helper to check if any key in a vector is presentToon Claes, Sep 1, 2026
  15. 4/6 revision: add Bloom check that includes parent directoriesToon Claes, Sep 1, 2026
  16. 5/6 last-modified: check pathspec against Bloom filter firstToon Claes, Sep 1, 2026
  17. 6/6 last-modified: keep per-path Bloom filters for wildcard pathspecsToon Claes, Sep 1, 2026
  18. Junio C HamanoSep 1, 2026
  19. Patrick SteinhardtSep 10, 2026
  20. Patrick SteinhardtSep 10, 2026
  21. Patrick SteinhardtSep 10, 2026
  22. Patrick SteinhardtSep 10, 2026

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.