Merge branch 'jk/more-push-completion'

* jk/more-push-completion:
  completion: complete `git push --force-with-lease=`
  completion: add some missing options to `git push`
  completion: complete "unstuck" `git push --recurse-submodules`
This commit is contained in:
Junio C Hamano 2014-07-30 14:21:13 -07:00
commit 0d9cb2d14e

View File

@ -1621,12 +1621,33 @@ _git_pull ()
__git_push_recurse_submodules="check on-demand" __git_push_recurse_submodules="check on-demand"
__git_complete_force_with_lease ()
{
local cur_=$1
case "$cur_" in
--*=)
;;
*:*)
__gitcomp_nl "$(__git_refs)" "" "${cur_#*:}"
;;
*)
__gitcomp_nl "$(__git_refs)" "" "$cur_"
;;
esac
}
_git_push () _git_push ()
{ {
case "$prev" in case "$prev" in
--repo) --repo)
__gitcomp_nl "$(__git_remotes)" __gitcomp_nl "$(__git_remotes)"
return return
;;
--recurse-submodules)
__gitcomp "$__git_push_recurse_submodules"
return
;;
esac esac
case "$cur" in case "$cur" in
--repo=*) --repo=*)
@ -1637,11 +1658,16 @@ _git_push ()
__gitcomp "$__git_push_recurse_submodules" "" "${cur##--recurse-submodules=}" __gitcomp "$__git_push_recurse_submodules" "" "${cur##--recurse-submodules=}"
return return
;; ;;
--force-with-lease=*)
__git_complete_force_with_lease "${cur##--force-with-lease=}"
return
;;
--*) --*)
__gitcomp " __gitcomp "
--all --mirror --tags --dry-run --force --verbose --all --mirror --tags --dry-run --force --verbose
--quiet --prune --delete --follow-tags
--receive-pack= --repo= --set-upstream --receive-pack= --repo= --set-upstream
--recurse-submodules= --force-with-lease --force-with-lease= --recurse-submodules=
" "
return return
;; ;;