Skip to main content

install_hook

Function install_hook 

Source
pub fn install_hook(
    target_dir: &str,
    style: &str,
) -> Result<InstalledHook, HookInstallError>
Expand description

install_hook(target_dir, style) — write the bundled style script to <dir>/.git/hooks/<style> and make it executable (git requires the exec bit; the oracle ORs S_IXUSR|S_IXGRP|S_IXOTH onto the fresh file’s mode, yielding 0755 under the usual umask).