Merge branch 'maint'
authorJunio C Hamano <gitster@pobox.com>
Thu, 28 Jan 2010 22:33:33 +0000 (14:33 -0800)
committerJunio C Hamano <gitster@pobox.com>
Thu, 28 Jan 2010 22:33:33 +0000 (14:33 -0800)
* maint:
bash: don't offer remote transport helpers as subcommands

1  2 
contrib/completion/git-completion.bash
index 8b56c34bde2227e7facfc8f96ceec7f912237189,1a762e88e7fcf3b36b3acdffa3e8ec18e3644e2e..da46bf81e6885d7b72f3112a80b692b95cfbd7a8
@@@ -161,8 -161,11 +161,8 @@@ __git_ps1 (
                        fi
                fi
  
 -              if [ -n "${1-}" ]; then
 -                      printf "$1" "$c${b##refs/heads/}$w$i$s$u$r"
 -              else
 -                      printf " (%s)" "$c${b##refs/heads/}$w$i$s$u$r"
 -              fi
 +              local f="$w$i$s$u"
 +              printf "${1:- (%s)}" "$c${b##refs/heads/}${f:+ $f}$r"
        fi
  }
  
@@@ -568,6 -571,7 +568,7 @@@ __git_list_porcelain_commands (
                read-tree)        : plumbing;;
                receive-pack)     : plumbing;;
                reflog)           : plumbing;;
+               remote-*)         : transport;;
                repo-config)      : deprecated;;
                rerere)           : plumbing;;
                rev-list)         : plumbing;;
@@@ -1306,24 -1310,6 +1307,24 @@@ _git_name_rev (
        __gitcomp "--tags --all --stdin"
  }
  
 +_git_notes ()
 +{
 +      local subcommands="edit show"
 +      if [ -z "$(__git_find_on_cmdline "$subcommands")" ]; then
 +              __gitcomp "$subcommands"
 +              return
 +      fi
 +
 +      case "${COMP_WORDS[COMP_CWORD-1]}" in
 +      -m|-F)
 +              COMPREPLY=()
 +              ;;
 +      *)
 +              __gitcomp "$(__git_refs)"
 +              ;;
 +      esac
 +}
 +
  _git_pull ()
  {
        __git_complete_strategy && return
@@@ -2035,7 -2021,7 +2036,7 @@@ _git_svn (
                init fetch clone rebase dcommit log find-rev
                set-tree commit-diff info create-ignore propget
                proplist show-ignore show-externals branch tag blame
 -              migrate
 +              migrate mkdirs reset gc
                "
        local subcommand="$(__git_find_on_cmdline "$subcommands")"
        if [ -z "$subcommand" ]; then
                        __gitcomp "--stdin $cmt_opts $fc_opts"
                        ;;
                create-ignore,--*|propget,--*|proplist,--*|show-ignore,--*|\
 -              show-externals,--*)
 +              show-externals,--*|mkdirs,--*)
                        __gitcomp "--revision="
                        ;;
                log,--*)
                                --no-auth-cache --username=
                                "
                        ;;
 +              reset,--*)
 +                      __gitcomp "--revision= --parent"
 +                      ;;
                *)
                        COMPREPLY=()
                        ;;
@@@ -2236,7 -2219,6 +2237,7 @@@ _git (
        merge-base)  _git_merge_base ;;
        mv)          _git_mv ;;
        name-rev)    _git_name_rev ;;
 +      notes)       _git_notes ;;
        pull)        _git_pull ;;
        push)        _git_push ;;
        rebase)      _git_rebase ;;