Merge branch 'tb/complete-word-diff-regex' into maint
authorJunio C Hamano <gitster@pobox.com>
Fri, 5 Feb 2016 22:54:17 +0000 (14:54 -0800)
committerJunio C Hamano <gitster@pobox.com>
Fri, 5 Feb 2016 22:54:17 +0000 (14:54 -0800)
* tb/complete-word-diff-regex:
completion: complete "diff --word-diff-regex="

1  2 
contrib/completion/git-completion.bash
index 59a51fe34449c17b19a4f9cbbf8edc3b4e508eb8,612e30b00a5bb94098e5b0a0b05520270cebde7e..63f5c046a2c7058692657ffa4e97f20367bafedc
@@@ -10,7 -10,6 +10,7 @@@
  #    *) local and remote tag names
  #    *) .git/remotes file names
  #    *) git 'subcommands'
 +#    *) git email aliases for git-send-email
  #    *) tree paths within 'ref:path/to/file' expressions
  #    *) file paths within current working directory and index
  #    *) common --long-options
@@@ -664,7 -663,6 +664,7 @@@ __git_list_porcelain_commands (
                check-mailmap)    : plumbing;;
                check-ref-format) : plumbing;;
                checkout-index)   : plumbing;;
 +              column)           : internal helper;;
                commit-tree)      : plumbing;;
                count-objects)    : infrequent;;
                credential)       : credentials;;
@@@ -746,8 -744,9 +746,8 @@@ __git_compute_porcelain_commands (
  __git_get_config_variables ()
  {
        local section="$1" i IFS=$'\n'
 -      for i in $(git --git-dir="$(__gitdir)" config --get-regexp "^$section\..*" 2>/dev/null); do
 -              i="${i#$section.}"
 -              echo "${i/ */}"
 +      for i in $(git --git-dir="$(__gitdir)" config --name-only --get-regexp "^$section\..*" 2>/dev/null); do
 +              echo "${i#$section.}"
        done
  }
  
@@@ -1169,7 -1168,7 +1169,7 @@@ __git_diff_common_options="--stat --num
                        --no-prefix --src-prefix= --dst-prefix=
                        --inter-hunk-context=
                        --patience --histogram --minimal
-                       --raw --word-diff
+                       --raw --word-diff --word-diff-regex=
                        --dirstat --dirstat= --dirstat-by-file
                        --dirstat-by-file= --cumulative
                        --diff-algorithm=
@@@ -1668,10 -1667,7 +1668,10 @@@ _git_push (
  _git_rebase ()
  {
        local dir="$(__gitdir)"
 -      if [ -d "$dir"/rebase-apply ] || [ -d "$dir"/rebase-merge ]; then
 +      if [ -f "$dir"/rebase-merge/interactive ]; then
 +              __gitcomp "--continue --skip --abort --edit-todo"
 +              return
 +      elif [ -d "$dir"/rebase-apply ] || [ -d "$dir"/rebase-merge ]; then
                __gitcomp "--continue --skip --abort"
                return
        fi
                        --preserve-merges --stat --no-stat
                        --committer-date-is-author-date --ignore-date
                        --ignore-whitespace --whitespace=
 -                      --autosquash --fork-point --no-fork-point
 -                      --autostash
 +                      --autosquash --no-autosquash
 +                      --fork-point --no-fork-point
 +                      --autostash --no-autostash
 +                      --verify --no-verify
 +                      --keep-empty --root --force-rebase --no-ff
 +                      --exec
                        "
  
                return
@@@ -1717,15 -1709,6 +1717,15 @@@ __git_send_email_suppresscc_options="au
  
  _git_send_email ()
  {
 +      case "$prev" in
 +      --to|--cc|--bcc|--from)
 +              __gitcomp "
 +              $(git --git-dir="$(__gitdir)" send-email --dump-aliases 2>/dev/null)
 +              "
 +              return
 +              ;;
 +      esac
 +
        case "$cur" in
        --confirm=*)
                __gitcomp "
                        " "" "${cur##--thread=}"
                return
                ;;
 +      --to=*|--cc=*|--bcc=*|--from=*)
 +              __gitcomp "
 +              $(git --git-dir="$(__gitdir)" send-email --dump-aliases 2>/dev/null)
 +              " "" "${cur#--*=}"
 +              return
 +              ;;
        --*)
                __gitcomp "--annotate --bcc --cc --cc-cmd --chain-reply-to
                        --compose --confirm= --dry-run --envelope-sender
@@@ -1797,7 -1774,15 +1797,7 @@@ __git_config_get_set_variables (
                c=$((--c))
        done
  
 -      git --git-dir="$(__gitdir)" config $config_file --list 2>/dev/null |
 -      while read -r line
 -      do
 -              case "$line" in
 -              *.*=*)
 -                      echo "${line/=*/}"
 -                      ;;
 -              esac
 -      done
 +      git --git-dir="$(__gitdir)" config $config_file --name-only --list 2>/dev/null
  }
  
  _git_config ()
                        --get --get-all --get-regexp
                        --add --unset --unset-all
                        --remove-section --rename-section
 +                      --name-only
                        "
                return
                ;;
                http.postBuffer
                http.proxy
                http.sslCipherList
 +              http.sslVersion
                http.sslCAInfo
                http.sslCAPath
                http.sslCert
@@@ -2372,7 -2355,7 +2372,7 @@@ _git_show_branch (
        case "$cur" in
        --*)
                __gitcomp "
 -                      --all --remotes --topo-order --current --more=
 +                      --all --remotes --topo-order --date-order --current --more=
                        --list --independent --merge-base --no-name
                        --color --no-color
                        --sha1-name --sparse --topics --reflog
  
  _git_stash ()
  {
 -      local save_opts='--keep-index --no-keep-index --quiet --patch'
 +      local save_opts='--all --keep-index --no-keep-index --quiet --patch --include-untracked'
        local subcommands='save list show apply clear drop pop create branch'
        local subcommand="$(__git_find_on_cmdline "$subcommands")"
        if [ -z "$subcommand" ]; then
                apply,--*|pop,--*)
                        __gitcomp "--index --quiet"
                        ;;
 -              show,--*|drop,--*|branch,--*)
 +              drop,--*)
 +                      __gitcomp "--quiet"
 +                      ;;
 +              show,--*|branch,--*)
 +                      ;;
 +              branch,*)
 +                if [ $cword -eq 3 ]; then
 +                      __gitcomp_nl "$(__git_refs)";
 +                      else
 +                              __gitcomp_nl "$(git --git-dir="$(__gitdir)" stash list \
 +                                              | sed -n -e 's/:.*//p')"
 +                      fi
                        ;;
 -              show,*|apply,*|drop,*|pop,*|branch,*)
 +              show,*|apply,*|drop,*|pop,*)
                        __gitcomp_nl "$(git --git-dir="$(__gitdir)" stash list \
                                        | sed -n -e 's/:.*//p')"
                        ;;