Skip to main content

run_hook_dispatch

Function run_hook_dispatch 

Source
pub fn run_hook_dispatch(
    target: &DispatchTarget,
    arguments: &[OsString],
    environment: &[(OsString, OsString)],
) -> i32
Expand description

What: Run the real Git hook runner for one event under the plan’s lock, and return its status. Why: The incumbent’s dispatch: a disabled event exits 0 untouched, the lock is taken unless the plan skips it, Git runs hook run --ignore-missing <event> with the repository’s hooks path, a signal or a failure to report a status is exit 1, and the lock is released afterwards.

In TS you’d write (pseudocode):

async function dispatch(event, args): Promise<void>;