pub fn write_hook_dispatch(
hooks_directory: &Path,
plan: &HookDispatchPlan,
executable: &Path,
) -> Result<(), HookEntryError>Expand description
What:
Create a new hooks directory holding the plan and one entry per preparation event.
Why:
The incumbent’s writeHookShim, with native entries instead of a Node program:
post-commit has no entry, so it never runs during preparation.
A configuration that defines no hook by name gets no entry at all: Git then finds nothing to start, which is what
an entry would have done after re-entering this executable, taking the hook lock and running git hook run.
The directory must not exist, so nothing half-written is reused.
In TS you’d write (pseudocode):
await writeHookShim({ hooksDirectory, plan, nodePath });