Skip to main content

Module commit_command

Module commit_command 

Source
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 preparation and landing through the resident service, the settled events, the post-commit gate and the handoff of the automatic backup. Why: The wrapper runs the commit instead of forwarding it, prints the pre-forward events only after the commit returned, then runs the post-commit gate for a landed commit and, when the gate passes, hands the push to the service. A commit that landed nothing exits with its own status.

In TS you’d write (pseudocode):

const commit = await serviceCommit({ args, gitPath, policyOptions });
renderPolicyEvents(commit.policyResult.events);
const post = await runPostCommitLifecycle({ ... }); await handOverPush({ ... });

Structs§

CommitCommand
What: Everything the commit command reads from the wrapped invocation. Why: The command needs the identity and the loaded configuration the lifecycle already resolved.
CommitEnding
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 -C of 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 commit through the service and its lifecycle. Why: The service is the only writer of a commit, so the command takes no lock and recovers nothing: it prepares the commit, sends it, and reports what the service landed.