Skip to main content

Module command_status

Module command_status 

Source
Expand description

The Git 2.56.0 option table of git status, its facts and the advice-key reading. What: The complete git status option table of Git 2.56.0, the machine-readable fact read from it, and the reading of advice.statusHints set before the subcommand. Why: The status-hints transform must not override an explicit caller choice, and the wrapper adds no note to output a program will parse.

In TS you’d write (pseudocode):

// parseStatusPreRegion(pre).hasStatusHintsOverride; parseStatusPostRegion(post).isMachineReadable

Structs§

StatusRegion
What: Facts of the region after status. bool is true or false. Why: Short, porcelain and NUL-terminated output is parsed by programs.

Constants§

LONG
--long.
NULL
-z, --null.
PORCELAIN
--porcelain[=<version>].
SHORT
-s, --short.
STATUS_TABLE
What: Rows of builtin_status_options (builtin/commit.c:1548-1599), in source order. &[OptionSpec] is a borrowed table baked into the program. Why: Four rows take an optional value (PARSE_OPT_OPTARG), so a token after them is a pathspec, not their value.

Functions§

has_status_hints_override
What: Whether the caller configured advice.statusHints in the global options before the subcommand. global_prefix is exactly those tokens. Why: git -c advice.statusHints=true status keeps Git’s hints; the wrapper neither overrides the choice nor adds its own note. Gotcha: Divergence from the incumbent: --config-env sets the same key and counts too.
parse_status_region
What: Parse the region after status. Result<A, B> is “either success A or failure B”. Why: A region Git itself would refuse yields the refusal, never a guessed fact.