From: Junio C Hamano Date: Thu, 28 Jan 2010 22:33:33 +0000 (-0800) Subject: Merge branch 'maint' X-Git-Tag: v1.7.0-rc1~11 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/dace5dd14166ebc2b55f46695d27dce0e64c6464?hp=-c Merge branch 'maint' * maint: bash: don't offer remote transport helpers as subcommands --- dace5dd14166ebc2b55f46695d27dce0e64c6464 diff --combined contrib/completion/git-completion.bash index 8b56c34bde,1a762e88e7..da46bf81e6 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@@ -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 @@@ -2082,7 -2068,7 +2083,7 @@@ __gitcomp "--stdin $cmt_opts $fc_opts" ;; create-ignore,--*|propget,--*|proplist,--*|show-ignore,--*|\ - show-externals,--*) + show-externals,--*|mkdirs,--*) __gitcomp "--revision=" ;; log,--*) @@@ -2119,9 -2105,6 +2120,9 @@@ --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 ;;