Merge branch 'jk/asciidoc-markup-fix'
[gitweb.git] / contrib / completion / git-completion.bash
index 1e8965b828b19efa501c5631b364cd0187697759..20b81146128960041f39b755d37e1d4d6bf61312 100644 (file)
@@ -186,7 +186,7 @@ fi
 
 __gitcompappend ()
 {
-       local i=${#COMPREPLY[@]}
+       local i=${#COMPREPLY[@]}
        for x in $1; do
                if [[ "$x" == "$3"* ]]; then
                        COMPREPLY[i++]="$2$x$4"
@@ -411,12 +411,9 @@ __git_refs_remotes ()
 
 __git_remotes ()
 {
-       local i IFS=$'\n' d="$(__gitdir)"
+       local d="$(__gitdir)"
        test -d "$d/remotes" && ls -1 "$d/remotes"
-       for i in $(git --git-dir="$d" config --get-regexp 'remote\..*\.url' 2>/dev/null); do
-               i="${i#remote.}"
-               echo "${i/.url*/}"
-       done
+       git --git-dir="$d" remote
 }
 
 __git_list_merge_strategies ()
@@ -668,8 +665,8 @@ __git_list_porcelain_commands ()
                checkout-index)   : plumbing;;
                commit-tree)      : plumbing;;
                count-objects)    : infrequent;;
-               credential-cache) : credentials helper;;
-               credential-store) : credentials helper;;
+               credential)       : credentials;;
+               credential-*)     : credentials helper;;
                cvsexportcommit)  : export;;
                cvsimport)        : import;;
                cvsserver)        : daemon;;
@@ -738,7 +735,6 @@ __git_list_porcelain_commands ()
 __git_porcelain_commands=
 __git_compute_porcelain_commands ()
 {
-       __git_compute_all_commands
        test -n "$__git_porcelain_commands" ||
        __git_porcelain_commands=$(__git_list_porcelain_commands)
 }
@@ -980,7 +976,7 @@ _git_branch ()
 
        case "$cur" in
        --set-upstream-to=*)
-               __gitcomp "$(__git_refs)" "" "${cur##--set-upstream-to=}"
+               __gitcomp_nl "$(__git_refs)" "" "${cur##--set-upstream-to=}"
                ;;
        --*)
                __gitcomp "
@@ -1048,7 +1044,7 @@ _git_checkout ()
 
 _git_cherry ()
 {
-       __gitcomp "$(__git_refs)"
+       __gitcomp_nl "$(__git_refs)"
 }
 
 _git_cherry_pick ()
@@ -1305,7 +1301,7 @@ _git_gitk ()
 }
 
 __git_match_ctag() {
-       awk "/^${1////\\/}/ { print \$1 }" "$2"
+       awk "/^${1//\//\\/}/ { print \$1 }" "$2"
 }
 
 _git_grep ()
@@ -1425,7 +1421,7 @@ __git_log_gitk_options="
 # Options that go well for log and shortlog (not gitk)
 __git_log_shortlog_options="
        --author= --committer= --grep=
-       --all-match
+       --all-match --invert-grep
 "
 
 __git_log_pretty_formats="oneline short medium full fuller email raw format:"
@@ -1451,7 +1447,7 @@ _git_log ()
                return
                ;;
        --decorate=*)
-               __gitcomp "long short" "" "${cur##--decorate=}"
+               __gitcomp "full short no" "" "${cur##--decorate=}"
                return
                ;;
        --*)
@@ -2126,6 +2122,7 @@ _git_config ()
                http.noEPSV
                http.postBuffer
                http.proxy
+               http.sslCipherList
                http.sslCAInfo
                http.sslCAPath
                http.sslCert
@@ -2189,6 +2186,7 @@ _git_config ()
                pull.octopus
                pull.twohead
                push.default
+               push.followTags
                rebase.autosquash
                rebase.stat
                receive.autogc