Merge branch 'sg/complete-help-undup'
authorJunio C Hamano <gitster@pobox.com>
Mon, 26 Nov 2012 02:43:54 +0000 (18:43 -0800)
committerJunio C Hamano <gitster@pobox.com>
Mon, 26 Nov 2012 02:43:54 +0000 (18:43 -0800)
* sg/complete-help-undup:
completion: remove 'help' duplicate from porcelain commands

1  2 
contrib/completion/git-completion.bash
index 85ae4191e52966c86e2bc1dc76d0454a8a485b20,5e23ec074bc12281e4797a4b1ac16a2d478693ed..0960acc58680b97a6cc0cf22fe7980d8758c6ee4
@@@ -321,7 -321,7 +321,7 @@@ __git_refs (
                                if [[ "$ref" == "$cur"* ]]; then
                                        echo "$ref"
                                fi
 -                      done | uniq -u
 +                      done | sort | uniq -u
                fi
                return
        fi
@@@ -585,7 -585,7 +585,7 @@@ __git_list_porcelain_commands (
  {
        local i IFS=" "$'\n'
        __git_compute_all_commands
-       for i in "help" $__git_all_commands
+       for i in $__git_all_commands
        do
                case $i in
                *--*)             : helper pattern;;
@@@ -1116,14 -1116,6 +1116,14 @@@ _git_fetch (
        __git_complete_remote_or_refspec
  }
  
 +__git_format_patch_options="
 +      --stdout --attach --no-attach --thread --thread= --output-directory
 +      --numbered --start-number --numbered-files --keep-subject --signoff
 +      --signature --no-signature --in-reply-to= --cc= --full-index --binary
 +      --not --all --cover-letter --no-prefix --src-prefix= --dst-prefix=
 +      --inline --suffix= --ignore-if-in-upstream --subject-prefix=
 +"
 +
  _git_format_patch ()
  {
        case "$cur" in
                return
                ;;
        --*)
 -              __gitcomp "
 -                      --stdout --attach --no-attach --thread --thread=
 -                      --output-directory
 -                      --numbered --start-number
 -                      --numbered-files
 -                      --keep-subject
 -                      --signoff --signature --no-signature
 -                      --in-reply-to= --cc=
 -                      --full-index --binary
 -                      --not --all
 -                      --cover-letter
 -                      --no-prefix --src-prefix= --dst-prefix=
 -                      --inline --suffix= --ignore-if-in-upstream
 -                      --subject-prefix=
 -                      "
 +              __gitcomp "$__git_format_patch_options"
                return
                ;;
        esac
@@@ -1548,12 -1554,6 +1548,12 @@@ _git_send_email (
                __gitcomp "ssl tls" "" "${cur##--smtp-encryption=}"
                return
                ;;
 +      --thread=*)
 +              __gitcomp "
 +                      deep shallow
 +                      " "" "${cur##--thread=}"
 +              return
 +              ;;
        --*)
                __gitcomp "--annotate --bcc --cc --cc-cmd --chain-reply-to
                        --compose --confirm= --dry-run --envelope-sender
                        --signed-off-by-cc --smtp-pass --smtp-server
                        --smtp-server-port --smtp-encryption= --smtp-user
                        --subject --suppress-cc= --suppress-from --thread --to
 -                      --validate --no-validate"
 +                      --validate --no-validate
 +                      $__git_format_patch_options"
                return
                ;;
        esac
 -      COMPREPLY=()
 +      __git_complete_revlist
  }
  
  _git_stage ()