Skip to main content

split_commit_invocation

Function split_commit_invocation 

Source
pub fn split_commit_invocation(
    args: &[String],
    subcommand_index: usize,
) -> (Vec<String>, Vec<String>)
Expand description

What: Splits a transformed argument list into the kept global options and the commit region. Why: Redirecting options (-C, --git-dir, --work-tree, --bare) would send native commit elsewhere, so they are dropped with their values, and every other global option is kept in order.

In TS you’d write (pseudocode):

splitCommitInvocation({ args, subcommandIndex });