Skip to main content

Module post_landing

Module post_landing 

Source
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. 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. A maintenance failure is logged and never fails the landed commit; a copy or disposal failure fails the command with its message, as the incumbent’s thrown error does. No hook and no program named by a configuration runs after the landing.

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 });

Structs§

LandedTransaction
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_records holds the selected corrections followed by the hook changes, as the incumbent orders them.
PostLandingOutcome
What: What post-landing completion did, reported for the caller’s diagnostics. Why: An action’s ending is reported on standard error by the runner and never changes the exit status.
PostLandingRequest
What: The inputs of one post-landing completion. Why: The context carries the caller’s global options for maintenance.

Enums§

PostLandingError
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 completion.