Code

Merge branch 'gh/maint-stash-show-error-message' into maint
[git.git] / contrib / completion / git-completion.bash
index da46bf81e6885d7b72f3112a80b692b95cfbd7a8..733ac39a32f6fd0b4f1546d429ac55c4ad6699b6 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"
                        ;;
@@ -667,7 +669,7 @@ _git_am ()
 {
        local cur="${COMP_WORDS[COMP_CWORD]}" dir="$(__gitdir)"
        if [ -d "$dir"/rebase-apply ]; then
-               __gitcomp "--skip --resolved --abort"
+               __gitcomp "--skip --continue --resolved --abort"
                return
        fi
        case "$cur" in
@@ -1386,6 +1388,7 @@ _git_rebase ()
                        --preserve-merges --stat --no-stat
                        --committer-date-is-author-date --ignore-date
                        --ignore-whitespace --whitespace=
+                       --autosquash
                        "
 
                return