Skip to main content

normalise_commit_args

Function normalise_commit_args 

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

What: Normalises the post-commit argument region, keeping the pathspec tail verbatim. Why: Later transforms recognize separated values only, and the pathspec tail after -- must not change.

In TS you’d write (pseudocode):

normaliseCommitArgs(['-amhello', 'file.ts']); // ['-a', '-m', 'hello', 'file.ts']