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§
- Commit
Region - What:
Final-state facts of one
git commitregion.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§
- Fixup
Kind - What:
The form of a
--fixupvalue (builtin/commit.c:1378-1411). Anenumis a closed set of named alternatives. Why:amend:andreword:turn on--allow-empty;reword:also turns on--onlyitself and refuses paths and an explicit-o.
Constants§
- COMMIT_
ESCAPE_ HATCH - Wrapper-only flag that suppresses
-oinjection for one commit invocation.
Functions§
- parse_
commit_ region - What:
Parse the region after
commit.wrapper_flagslists the caller’s other wrapper-only spellings;Result<A, B>is “either successAor failureB”. Why: A region Git itself would refuse yields the refusal, never a guessed fact set.