Skip to content

Commit

Permalink
completion: complete git push --force-with-lease=
Browse files Browse the repository at this point in the history
Signed-off-by: John Keeping <john@keeping.me.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
John Keeping authored and Junio C Hamano committed Jul 22, 2014
1 parent 9e8a6a9 commit aaf7253
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion contrib/completion/git-completion.bash
Original file line number Diff line number Diff line change
Expand Up @@ -1611,6 +1611,22 @@ _git_pull ()

__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 ()
{
case "$prev" in
Expand All @@ -1632,12 +1648,16 @@ _git_push ()
__gitcomp "$__git_push_recurse_submodules" "" "${cur##--recurse-submodules=}"
return
;;
--force-with-lease=*)
__git_complete_force_with_lease "${cur##--force-with-lease=}"
return
;;
--*)
__gitcomp "
--all --mirror --tags --dry-run --force --verbose
--quiet --prune --delete --follow-tags
--receive-pack= --repo= --set-upstream
--recurse-submodules=
--force-with-lease --force-with-lease= --recurse-submodules=
"
return
;;
Expand Down

0 comments on commit aaf7253

Please sign in to comment.