Expand description
The git commit command: the transaction, the settled events, the post-commit gate and the backup.
What:
The git commit command of the native wrapper: the transaction, the settled events, the post-commit gate and
the automatic backup, in the incumbent’s order.
Why:
The incumbent (src/bin.ts) runs the commit transaction instead of forwarding the commit, prints the
pre-forward events only after the transaction returned, then runs the post-commit lifecycle for a landed commit
and, when the gate passes, the automatic push. A commit that landed nothing exits with the transaction’s status.
In TS you’d write (pseudocode):
const transaction = await runCommitTransactionBoundary({ args, gitPath, policyOptions, concurrency });
renderPolicyEvents(transaction.policyResult.events);
const post = await runPostCommitLifecycle({ ... }); await autoPush({ ... });Structs§
- Commit
Command - What: Everything the commit command reads from the wrapped invocation. Why: The command needs the identity and the loaded configuration the lifecycle already resolved.
- Commit
Ending - What: The ending of one commit command. Why: Everything the command wrote it wrote itself and in order, so only the exit status is left to the caller.
Functions§
- effective_
directory - What:
The effective invocation directory: the process directory moved by every
-Cof the global options. Why: Relative pathspecs and the transaction’s Git queries resolve from where Git itself would run. - run_
commit_ command - What:
Run one
git committhrough the transaction and its lifecycle. Why: Startup recovery ran before configuration loaded, so the transaction starts from a clean registry unless a live transaction belongs to another invocation, which does not stop it.