Skip to main content

BRANCH_TABLE

Constant BRANCH_TABLE 

Source
pub const BRANCH_TABLE: &[OptionSpec];
Expand description

What: pub const NAME: &[OptionSpec] = &[...] is a table baked into the program. Why: --contains and its relatives are PARSE_OPT_LASTARG_DEFAULT: they take the next token unless they are last. --color, --abbrev, --column and --track take an attached value only, so git branch --color name creates name.

In TS you’d write (pseudocode):

export const BRANCH_TABLE = [row(UNREAD, 'v', 'verbose', 'none', true), /* ... */] as const;