Expand description
The post-commit run after a landing: author environment, hook lock, and the hook runner with inherited streams.
What:
The single post-commit run after a landing: its author environment, the hook lock around it,
and the real Git hook runner with inherited standard streams.
Why:
The incumbent’s commit-landing-post-commit-hook.ts runs it outside both landing locks,
under the hook lock unless hooks.concurrentCommits is true or an outer preparation lease is inherited.
Its exit status is ignored, as native Git ignores it, and the user sees the hook’s output on the terminal.
In TS you’d write (pseudocode):
await runPostCommitHook({ gitPath, cwd, globalArgs, realIndexPath, landedOid, plan });Structs§
- Post
Commit Hook Error - What: A failure of the post-commit run: the author lookup, the hook lock, or the hook’s start. Why: The caller reports the message and exits 1, as the incumbent reports a thrown error after a landing.
- Post
Commit Hook Request - What: The inputs of one post-commit run. Why: Named fields keep the paths apart, and the plan carries the disabled events and the hook lock.
Enums§
- Post
Commit Hook Outcome - What:
Whether
post-commitran, and the status its hook returned when it did. Why: A disabled event runs nothing, and a non-zero status is recorded but never fails the landed commit.
Functions§
- author_
environment - What:
The environment native
git commitgives the hook, from the landed commit’s%an,%aeand raw%ad. Why: Hooks readGIT_AUTHOR_*; the incumbent takes the NUL-separated fields and drops one trailing newline. - run_
post_ commit_ hook - What:
Run
post-commitonce for a landed commit. Why: The order matches the incumbent: disabled check, author lookup, hook lock, hook run, lock release.