Skip to main content

private_explicit_commit_args

Function private_explicit_commit_args 

Source
pub fn private_explicit_commit_args(
    args: &[String],
    pathspecs: &[String],
) -> Vec<String>
Expand description

What: Removes the pathspec-file controls and the explicit pathspecs, then the -- separator and -o/--only, from the commit region. Why: The private index already holds the selected paths, so the real commit names none of them. The pathspec removal runs from the last pathspec backwards with lastIndexOf, as the incumbent does.

In TS you’d write (pseudocode):

privateExplicitCommitArgs({ args, pathspecs });