restore: fix typo in docs
[gitweb.git] / contrib / completion / git-completion.bash
index b24bc482761368de2fa0da5a97c535dfb21274b6..656e49710e59fea8378c5f93eff2da072231eae6 100644 (file)
@@ -2183,6 +2183,10 @@ _git_switch ()
                fi
                if [ -z "$(__git_find_on_cmdline "-d --detach")" ]; then
                        only_local_ref=y
+               else
+                       # --guess --detach is invalid combination, no
+                       # dwim will be done when --detach is specified
+                       track_opt=
                fi
                if [ $only_local_ref = y -a -z "$track_opt" ]; then
                        __gitcomp_direct "$(__git_heads "" "$cur" " ")"
@@ -2491,6 +2495,21 @@ _git_reset ()
        __git_complete_refs
 }
 
+_git_restore ()
+{
+       case "$cur" in
+       --conflict=*)
+               __gitcomp "diff3 merge" "" "${cur##--conflict=}"
+               ;;
+       --source=*)
+               __git_complete_refs --cur="${cur##--source=}"
+               ;;
+       --*)
+               __gitcomp_builtin restore
+               ;;
+       esac
+}
+
 __git_revert_inprogress_options="--continue --quit --abort"
 
 _git_revert ()