Junio C Hamano <gitster@xxxxxxxxx> writes: > 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)