Skip to main content

restores_index_only

Function restores_index_only 

Source
pub fn restores_index_only(region: &[OsString]) -> bool
Expand 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;