Re: [PATCH 2/2] bloom: enable multiple pathspec bloom keys
- From
Lidong Yan <yldhome2d2@gmail.com>
- Date
- Jul 1, 2025, 05:52 UTC
- Message-ID
- <C8E0D62E-11B1-4921-AD4C-2905F10E07B6@gmail.com>
- In-Reply-To
- <xmqqy0td8fa9.fsf@gitster.g>
Junio C Hamano <gitster@pobox.com> writes:
Show 6 quoted lines
> Totally outside the topic, but I wonder if we can further optimize > by adding an early rejection using .nowildcard_len? Instead of > allowing a wildcarded "dir/*" pathspec element from disabling the > Bloom filter altogether, we could say "dir/ is not possibly altered, > so there may be dir/A, dir/B, etc., in the directory, nothing that > would match dir/* wildcard would have been modified", couldn't we?
I think, except for PATHSPEC_EXCLUDE, all other pathspec magic flags could potentially be optimized using .nowildcard_len by restricting checks to just the dir/ part of each pathspec item.
Here;s are all possible pathspec magic #define PATHSPEC_FROMTOP (1<<0) #define PATHSPEC_MAXDEPTH (1<<1) #define PATHSPEC_LITERAL (1<<2) #define PATHSPEC_GLOB (1<<3) #define PATHSPEC_ICASE (1<<4) #define PATHSPEC_EXCLUDE (1<<5) #define PATHSPEC_ATTR (1<<6)