Expand description
Post-landing completion of one landed commit: worktree copies, disposal, maintenance, then post-commit.
What:
The post-landing completion of one landed commit, in the incumbent’s order:
added-path worktree copies, shadow and transaction removal with capture pruning,
automatic maintenance, then post-commit under the hook lock.
Why:
The incumbent’s commit-transaction-conclusion.ts runs these steps after a landing.
Worktree copies come first, so an interruption before cleanup leaves the journal for recovery to finish them.
Maintenance bounds the pack count each landing grows, so it runs before the hook.
A maintenance failure is logged and never fails the landed commit; a copy, disposal or hook failure
fails the command with its message, as the incumbent’s thrown error does.
In TS you’d write (pseudocode):
await installAddedWorktreeFiles({ gitPath, cwd, repositoryRoot, records: [...addedPaths, ...worktreeRecords], objectDirectory });
await workspace[Symbol.asyncDispose]();
await runAutoMaintenance({ gitPath, cwd: repositoryRoot, globalArgs });
await runPostCommitHook({ gitPath, cwd: repositoryRoot, globalArgs, realIndexPath, landedOid, plan });Structs§
- Landed
Transaction - What:
What a landing reports about the commit it made, and the transaction paths that landing left behind.
Why:
The landing lane fills this from its outcome; this lane only reads it.
worktree_recordsholds the selected corrections followed by the hook changes, as the incumbent orders them. - Post
Landing Outcome - What: What post-landing completion did, reported for the caller’s diagnostics. Why: Only the hook’s status can change the caller’s output, and the incumbent ignores it, so the caller reports it and exits 0.
- Post
Landing Request - What: The inputs of one post-landing completion. Why: The context carries the caller’s global options for maintenance; the plan carries the hook lock and disabled events.
Enums§
- Post
Landing Error - What: A failure of one post-landing step, naming the step that failed. Why: The caller prints the message and exits 1; each variant keeps what the recovery may still need.
Functions§
- complete_
landed_ transaction - What: Complete a landed commit’s transaction in the incumbent’s order and report what each step did. Why: Each step runs only after the one before it succeeded, except maintenance, whose failure never stops the hook.