Skip to main content

ignored_index_message

Function ignored_index_message 

Source
pub fn ignored_index_message(flag_text: &str) -> String
Expand 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;