Skip to main content

Module command_config_table

Module command_config_table 

Source
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 except list and edit stops 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_OPTIONS adds before the type rows (config.c:111-117). Why: Git appends CONFIG_TYPE_OPTIONS to 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, --list of 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 byte f”, None “no letter”. Why: Every git config form starts with these rows; --file and --blob take 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 are PARSE_OPT_NOARG | PARSE_OPT_NONEG (config.c:140-149).
UNSET_ROWS
git config unset: the rows after location (config.c:1201-1204).