test(git): allow platform-specific staging hook

This commit is contained in:
Chris Bookholt
2026-07-03 17:52:35 -07:00
parent 92d1967d21
commit 809d6129a3
+1
View File
@@ -27,6 +27,7 @@ std::thread_local! {
}
#[cfg(test)]
#[cfg_attr(not(unix), allow(dead_code))]
fn set_stage_paths_hook(point: StagePathsHookPoint, hook: impl FnOnce() + 'static) {
STAGE_PATHS_HOOKS.with(|slots| {
let prior = slots.borrow_mut()[point as usize].replace(Box::new(hook));