Code

Merge branch 'maint-1.6.2' into maint
[git.git] / contrib / completion / git-completion.bash
index dd6cd250e35cb695107d4a9f610752e09ec5bbb7..f44152c4331bb6a2de764e6dcc98c1ac39e517e5 100755 (executable)
@@ -132,7 +132,7 @@ __git_ps1 ()
                local c
 
                if [ "true" = "$(git rev-parse --is-inside-git-dir 2>/dev/null)" ]; then
-                       if [ "true" = "$(git config --bool core.bare 2>/dev/null)" ]; then
+                       if [ "true" = "$(git rev-parse --is-bare-repository 2>/dev/null)" ]; then
                                c="BARE:"
                        else
                                b="GIT_DIR!"
@@ -1804,7 +1804,7 @@ _git_show ()
                return
                ;;
        --*)
-               __gitcomp "--pretty= --format=
+               __gitcomp "--pretty= --format= --abbrev-commit --oneline
                        $__git_diff_common_options
                        "
                return
@@ -1821,7 +1821,7 @@ _git_show_branch ()
                __gitcomp "
                        --all --remotes --topo-order --current --more=
                        --list --independent --merge-base --no-name
-                       --sha1-name --topics --reflog
+                       --sha1-name --sparse --topics --reflog
                        "
                return
                ;;