@matheusbsbs / matheus-bagliano / commits / 0bc18daa2f
Fork 0

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 <uzonyi.akos@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Ákos Uzonyi committed Sep 25, 2020 at 23:11 UTC 0bc18daa2f5d05b1b77293aef391008e07076d02
1 file changed +7
contrib/completion/git-completion.bash
+7
@@ -2841,6 +2841,13 @@ _git_reset ()
2841
2842 _git_restore ()
2843 {
2844 + case "$prev" in
2845 + -s)
2846 + __git_complete_refs
2847 + return
2848 + ;;
2849 + esac
2850 +
2851 case "$cur" in
2852 --conflict=*)
2853 __gitcomp "diff3 merge" "" "${cur##--conflict=}"