pub fn parse_stash_region(
region: &[OsString],
wrapper_flags: &[&[u8]],
) -> Result<StashRegion, OptionError>Expand description
What:
Parse the region after stash.
Result<A, B> is “either success A or failure B”.
Why:
Leading wrapper flags are skipped first,
so git stash --no-enforce-worktree list
still dispatches to list;
the rest follows the selected subcommand’s grammar.
In TS you’d write (pseudocode):
function parseStashRegion(region: string[], wrapperFlags: string[]): StashRegion; // throws