Skip to main content

parse_commit_region

Function parse_commit_region 

Source
pub fn parse_commit_region(
    region: &[OsString],
    wrapper_flags: &[&[u8]],
) -> Result<CommitRegion, OptionError>
Expand description

What: Parse the region after commit. wrapper_flags lists the caller’s other wrapper-only spellings; Result<A, B> is “either success A or failure B”. Why: A region Git itself would refuse yields the refusal, never a guessed fact set.

In TS you’d write (pseudocode):

function parseCommitRegion(region: string[], wrapperFlags: string[]): CommitRegion; // throws