pub fn ignored_index_message(flag_text: &str) -> StringExpand description
What:
Build the diagnostic for a pathless --amend/--allow-empty commit over a dirty
index.
&str borrows the flag text;
String is the owned result.
Why:
An injected --only would commit HEAD’s existing tree and leave the staged
changes staged without any warning from Git.
In TS you’d write (pseudocode):
function ignoredIndexMessage(flagText: string): string;