]> asedeno.scripts.mit.edu Git - git.git/blobdiff - contrib/completion/git-completion.bash
Merge branch 'rr/remote-helper-doc'
[git.git] / contrib / completion / git-completion.bash
index 8593fd707b5e80b8d8833454744dbe261fa5e9e5..545bd4b38368e3c2a3958133bbeef6a19e831fff 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 ;;
@@ -1087,6 +1093,11 @@ _git_gc ()
        COMPREPLY=()
 }
 
+_git_gitk ()
+{
+       _gitk
+}
+
 _git_grep ()
 {
        __git_has_doubledash && return