revert: allow cherry-picking more than one commit
[gitweb.git] / contrib / completion / git-completion.bash
index 8593fd707b5e80b8d8833454744dbe261fa5e9e5..57245a8c01fa3aba4f9e3f2bc258b40f38f446c0 100755 (executable)
@@ -250,7 +250,9 @@ __git_refs ()
                        refs="${cur%/*}"
                        ;;
                *)
-                       if [ -e "$dir/HEAD" ]; then echo HEAD; fi
+                       for i in HEAD FETCH_HEAD ORIG_HEAD MERGE_HEAD; do
+                               if [ -e "$dir/$i" ]; then echo $i; fi
+                       done
                        format="refname:short"
                        refs="refs/tags refs/heads refs/remotes"
                        ;;
@@ -626,6 +628,10 @@ __git_aliased_command ()
                config --get "alias.$1")
        for word in $cmdline; do
                case "$word" in
+               \!gitk|gitk)
+                       echo "gitk"
+                       return
+                       ;;
                \!*)    : shell command alias ;;
                -*)     : option ;;
                *=*)    : setting env ;;
@@ -791,6 +797,7 @@ _git_branch ()
                __gitcomp "
                        --color --no-color --verbose --abbrev= --no-abbrev
                        --track --no-track --contains --merged --no-merged
+                       --set-upstream
                        "
                ;;
        *)
@@ -1087,6 +1094,11 @@ _git_gc ()
        COMPREPLY=()
 }
 
+_git_gitk ()
+{
+       _gitk
+}
+
 _git_grep ()
 {
        __git_has_doubledash && return