Skip to content

pr-git-1227/DrHyde/filename-completion-for-git-restore-v3

From: David Cantrell <david@cantrell.org.uk>

If no --args are present after 'git restore' it assumes that you want
to tab-complete one of the files with unstaged uncommitted changes.

If a file has been staged we don't want to list it, as restoring those
requires a slightly more complex `git restore --staged`, so we only list
those files that are --modified. While --committable also looks like
a good candidate, that includes changes that have been staged.

Signed-off-by: David Cantrell <david@cantrell.org.uk>

Submitted-As: https://lore.kernel.org/git/pull.1227.v3.git.git.1647382437475.gitgitgadget@gmail.com
In-Reply-To: https://lore.kernel.org/git/pull.1227.git.git.1647032857097.gitgitgadget@gmail.com
In-Reply-To: https://lore.kernel.org/git/pull.1227.v2.git.git.1647305547.gitgitgadget@gmail.com
Assets 2