Merge branch 'master' of git://linux-nfs.org/~bfields/git
[gitweb.git] / contrib / completion / git-completion.bash
index d6252068c48b1db8218e0f77bf654ec37deebe76..82b9ed40d84dbb72c72e282392ca8eb247ab527e 100755 (executable)
@@ -592,13 +592,13 @@ _git_log ()
                __gitcomp "
                        --max-count= --max-age= --since= --after=
                        --min-age= --before= --until=
-                       --root --topo-order --date-order
+                       --root --topo-order --date-order --reverse
                        --no-merges
                        --abbrev-commit --abbrev=
                        --relative-date
                        --author= --committer= --grep=
                        --all-match
-                       --pretty= --name-status --name-only
+                       --pretty= --name-status --name-only --raw
                        --not --all
                        "
                return
@@ -682,8 +682,11 @@ _git_push ()
                        esac
                        __gitcomp "$(__git_refs "$remote")" "" "${cur#*:}"
                        ;;
+               +*)
+                       __gitcomp "$(__git_refs)" + "${cur#+}"
+                       ;;
                *)
-                       __gitcomp "$(__git_refs2)"
+                       __gitcomp "$(__git_refs)"
                        ;;
                esac
                ;;
@@ -764,9 +767,11 @@ _git_config ()
        case "$cur" in
        --*)
                __gitcomp "
-                       --global --list --replace-all
+                       --global --system
+                       --list --replace-all
                        --get --get-all --get-regexp
                        --add --unset --unset-all
+                       --remove-section --rename-section
                        "
                return
                ;;
@@ -785,7 +790,10 @@ _git_config ()
        remote.*.*)
                local pfx="${cur%.*}."
                cur="${cur##*.}"
-               __gitcomp "url fetch push" "$pfx" "$cur"
+               __gitcomp "
+                       url fetch push skipDefaultUpdate
+                       receivepack uploadpack tagopt
+                       " "$pfx" "$cur"
                return
                ;;
        remote.*)
@@ -835,6 +843,9 @@ _git_config ()
                format.headers
                gitcvs.enabled
                gitcvs.logfile
+               gitcvs.allbinary
+               gitcvs.dbname gitcvs.dbdriver gitcvs.dbuser gitcvs.dvpass
+               gc.packrefs
                gc.reflogexpire
                gc.reflogexpireunreachable
                gc.rerereresolved
@@ -851,9 +862,11 @@ _git_config ()
                i18n.commitEncoding
                i18n.logOutputEncoding
                log.showroot
+               merge.tool
                merge.summary
                merge.verbosity
                pack.window
+               pack.depth
                pull.octopus
                pull.twohead
                repack.useDeltaBaseOffset
@@ -959,6 +972,11 @@ _git_show ()
        __git_complete_file
 }
 
+_git_stash ()
+{
+       __gitcomp 'list show apply clear'
+}
+
 _git ()
 {
        local i c=1 command __git_dir
@@ -1015,6 +1033,7 @@ _git ()
        shortlog)    _git_shortlog ;;
        show)        _git_show ;;
        show-branch) _git_log ;;
+       stash)       _git_stash ;;
        whatchanged) _git_log ;;
        *)           COMPREPLY=() ;;
        esac
@@ -1060,6 +1079,7 @@ complete -o default -o nospace -F _git_remote git-remote
 complete -o default -o nospace -F _git_reset git-reset
 complete -o default -o nospace -F _git_shortlog git-shortlog
 complete -o default -o nospace -F _git_show git-show
+complete -o default -o nospace -F _git_stash git-stash
 complete -o default -o nospace -F _git_log git-show-branch
 complete -o default -o nospace -F _git_log git-whatchanged