From: Ákos Uzonyi Date: Fri, 25 Sep 2020 21:11:24 +0000 (+0200) Subject: completion: complete refs after 'git restore -s' X-Git-Tag: v2.29.0-rc0~23^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0bc18daa2f5d05b1b77293aef391008e07076d02;p=thirdparty%2Fgit.git 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 Signed-off-by: Junio C Hamano --- diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index 3d02bd4de7..0a96ad87e7 100644 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -2841,6 +2841,13 @@ _git_reset () _git_restore () { + case "$prev" in + -s) + __git_complete_refs + return + ;; + esac + case "$cur" in --conflict=*) __gitcomp "diff3 merge" "" "${cur##--conflict=}"