Skip to main content

Module command_commit

Module command_commit 

Source
Expand description

Facts about the arguments after git commit. What: Facts about the arguments after git commit, read as Git 2.56.0 reads them. Why: The commit-only transform, the dry-run check and the commit transaction all decide from these facts. Every fact is the final state after Git applied each option in order, so --all --no-all reports all off, exactly as git commit would act.

In TS you’d write (pseudocode):

// parseCommitRegion(postSubcommandArgs): CommitRegion  (throws OptionError)

Structs§

CommitRegion
What: Final-state facts of one git commit region. Vec<usize> is an owned list of token indexes; Option<bool> is “true, false, or never stated”. Why: Indexes point into the caller’s unchanged arguments, so paths keep their bytes.

Enums§

FixupKind
What: The form of a --fixup value (builtin/commit.c:1378-1411). An enum is a closed set of named alternatives. Why: amend: and reword: turn on --allow-empty; reword: also turns on --only itself and refuses paths and an explicit -o.

Constants§

COMMIT_ESCAPE_HATCH
Wrapper-only flag that suppresses -o injection for one commit invocation.

Functions§

parse_commit_region
What: Parse the region after commit. wrapper_flags lists the caller’s other wrapper-only spellings; Result<A, B> is “either success A or failure B”. Why: A region Git itself would refuse yields the refusal, never a guessed fact set.