pub fn run_intercept(db_dir: &Path, payload: &str) -> Option<String>Expand description
The whole hook body: parse the payload, open the store, decide.
None for every failure as well as for every pattern that passes through,
because the caller’s only two options are “block with this message” and
“stay out of the way”, and a store that is missing or busy is the second.
The pattern is tested before the store is opened. Opening one is the whole
cost of this hook — measured at ~360 ms on a small store, against ~0 for
the parse — and this runs before every single Grep, most of which are
searches no identifier test will ever accept.