pub fn restores_index_only(region: &[OsString]) -> boolExpand description
What:
Whether a git restore region touches the index only.
Why:
--staged alone unstages and leaves the files, so the guidance differs from a restore of file content;
--worktree beside it brings the files back in. --st and --w are the shortest unambiguous prefixes.
In TS you’d write (pseudocode):
function restoresIndexOnly(region: string[]): boolean;