[−][src]Function devx_pre_commit::install_self_as_hook
pub fn install_self_as_hook(project_root: impl AsRef<Path>) -> Result<()>
Copies the current_exe
file to ${project_root}/.git/hooks/pre-commit
That's all you need to register a git pre-commit hook.
It will silently overwrite the existing git pre-commit hook.