Skip to main content

resolve_hooks_path

Function resolve_hooks_path 

Source
pub fn resolve_hooks_path(worktree_root: &Path, configured: &Path) -> PathBuf
Expand description

What: The hooks directory a configured core.hooksPath names. Why: A relative value resolves against the worktree root, where Git runs hooks; absolute values stay absolute.

In TS you’d write (pseudocode):

isAbsolute(configured) ? configured : resolve(worktreeRoot, configured);