pub fn with_fixed_message(
arguments: &[OsString],
subcommand_index: usize,
file: &Path,
) -> Option<Vec<OsString>>Expand description
What:
The arguments of a commit Git built, rewritten so that the message the person already typed is used as it is and no
editor opens.
Why:
After the editor has run the message is fixed, so a commit built on a tip that has since moved is built again from
-F <file> with the message kept verbatim. A line that takes its author or its parents from another commit (-c, -C,
--fixup, --squash, --amend) cannot be rebuilt that way, and an abbreviated option that may be one of the dropped
ones is not guessed at: both give nothing, and the caller saves the message and stops.
In TS you’d write (pseudocode):
withFixedMessage(args, subcommandIndex, file) // undefined when the line cannot be rebuilt from the message alone