Skip to content

Commit 0bc18da

Browse files
AkosUzonyigitster
authored andcommitted
completion: complete refs after 'git restore -s'
Currently only the long version (--source=) supports completion. Add completion support to the short (-s) option too. Signed-off-by: Ákos Uzonyi <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent c09d128 commit 0bc18da

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

contrib/completion/git-completion.bash

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2841,6 +2841,13 @@ _git_reset ()
28412841

28422842
_git_restore ()
28432843
{
2844+
case "$prev" in
2845+
-s)
2846+
__git_complete_refs
2847+
return
2848+
;;
2849+
esac
2850+
28442851
case "$cur" in
28452852
--conflict=*)
28462853
__gitcomp "diff3 merge" "" "${cur##--conflict=}"

0 commit comments

Comments
 (0)