Skip to main content

Module rule_status_hints

Module rule_status_hints 

Source
Expand description

Pure decision of the status-hints transform. What: The pure decision of the status-hints transform: insert -c advice.statusHints=false before git status unless the caller set that key. Why: Git’s stock status hints suggest git add <file>... and git commit -a, forms the wrapper’s policies reject; the wrapper prints accurate guidance instead.

In TS you’d write (pseudocode):

// statusHintsOff(['status']) => ['-c', 'advice.statusHints=false', 'status']

Constants§

QUIET_INJECTION
Tokens inserted before status so Git itself does not print its stock hints.

Functions§

has_explicit_status_hints_override
What: Whether the caller configured advice.statusHints before the subcommand, whatever the subcommand is. &[OsString] borrows the full argument list. Why: The entry point also asks this to decide whether to print its own note, and it asks about the raw arguments, before any transform ran.
status_hints_off
What: Decide the transform for one command line. Why: The tokens go immediately before status, after every caller-supplied global option, so those survive and Git still reads the inserted pair as global.