pub fn run_commit_hook(
repo: &Repository,
hook_name: &str,
args: &[&str],
stdin_data: Option<&[u8]>,
commit_env: &CommitHookEnv<'_>,
) -> Result<HookResult, HookError>Expand description
Run commit-style hooks with GIT_INDEX_FILE, GIT_PREFIX, and related env (Git run_commit_hook).
Output follows Repository::hook_stdio.
ยงErrors
HookError::Spawn when a hook cannot be started, HookError::Internal when the
repository config cannot be loaded or hook.* entries are invalid.