Skip to main content

separator_index

Function separator_index 

Source
pub fn separator_index(region: &[String]) -> Option<usize>
Expand description

What: The index of the -- that ends the options of a commit region, or nothing when the person typed none. Why: Everything after it is a path, so a wrapper option must never follow it; a -- that is the value of an option such as -m is a message and not the separator.

In TS you’d write (pseudocode):

separatorIndex(['-m', '--', '--', 'a.txt']); // 2