Expand description
The Git 2.56.0 option groups of git config.
What:
The option groups of git config in Git 2.56.0,
one constant per group.
Why:
Git builds each git config subcommand’s table from shared groups
(CONFIG_LOCATION_OPTIONS,
CONFIG_TYPE_OPTIONS,
CONFIG_DISPLAY_OPTIONS,
builtin/config.c:67-117) plus a few rows of its own.
Keeping the same groups keeps
one copy of every row.
In TS you’d write (pseudocode):
// export const LOCATION_ROWS: readonly OptionSpec[] = [ ... ];Constants§
- CONFIG_
STOP_ MODE PARSE_OPT_STOP_AT_NON_OPTION: every form exceptlistandeditstops reading options at the first name (config.c:1100-1101, 1155-1156, 1209-1210, 1241-1242, 1271-1272, 1403-1405).- DISPLAY_
ROWS - What:
The rows
CONFIG_DISPLAY_OPTIONSadds before the type rows (config.c:111-117). Why: Git appendsCONFIG_TYPE_OPTIONSto this group, so users list both in that order. - GET_
FILTER_ ROWS git config get: the filter rows between location and display (config.c:1084-1089).- GET_
OTHER_ ROWS git config get: the rows after the display group (config.c:1091-1095).- GLOBAL
--global: use the per-user configuration file.- LEGACY_
ACTION_ ROWS - What:
The action rows of the form without a subcommand word (config.c:1373-1387).
Why:
Each is an
OPT_CMDMODE, which takes no value and has no--no-form. - LEGACY_
OTHER_ ROWS - The form without a subcommand word: the rows after the display group (config.c:1389-1395).
- LIST
-l,--listof the form without a subcommand word: list every variable.- LIST_
OTHER_ ROWS git config list: the row after the display group (config.c:1043-1050).- LOCATION_
ROWS - What:
CONFIG_LOCATION_OPTIONS(builtin/config.c:67-74).&[OptionSpec]is a borrowed table baked into the program;Some(b'f')is “the bytef”,None“no letter”. Why: Everygit configform starts with these rows;--fileand--blobtake a value, so a token after them is never an option. - SET_
ROWS git config set: the rows after location and type (config.c:1142-1148).- SYSTEM
--system: use the system-wide configuration file.- TYPE_
ROWS - What:
CONFIG_TYPE_OPTIONS(builtin/config.c:101-109). Why: The six type names arePARSE_OPT_NOARG | PARSE_OPT_NONEG(config.c:140-149). - UNSET_
ROWS git config unset: the rows after location (config.c:1201-1204).