Function devx_pre_commit::install_self_as_hook [−][src]
pub fn install_self_as_hook(project_root: impl AsRef<Path>) -> Result<()>
Expand description
Copies the std::env::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.