Skip to content

Commit aaf7253

Browse files
johnkeepinggitster
authored andcommitted
completion: complete git push --force-with-lease=
Signed-off-by: John Keeping <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 9e8a6a9 commit aaf7253

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

contrib/completion/git-completion.bash

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1611,6 +1611,22 @@ _git_pull ()
16111611

16121612
__git_push_recurse_submodules="check on-demand"
16131613

1614+
__git_complete_force_with_lease ()
1615+
{
1616+
local cur_=$1
1617+
1618+
case "$cur_" in
1619+
--*=)
1620+
;;
1621+
*:*)
1622+
__gitcomp_nl "$(__git_refs)" "" "${cur_#*:}"
1623+
;;
1624+
*)
1625+
__gitcomp_nl "$(__git_refs)" "" "$cur_"
1626+
;;
1627+
esac
1628+
}
1629+
16141630
_git_push ()
16151631
{
16161632
case "$prev" in
@@ -1632,12 +1648,16 @@ _git_push ()
16321648
__gitcomp "$__git_push_recurse_submodules" "" "${cur##--recurse-submodules=}"
16331649
return
16341650
;;
1651+
--force-with-lease=*)
1652+
__git_complete_force_with_lease "${cur##--force-with-lease=}"
1653+
return
1654+
;;
16351655
--*)
16361656
__gitcomp "
16371657
--all --mirror --tags --dry-run --force --verbose
16381658
--quiet --prune --delete --follow-tags
16391659
--receive-pack= --repo= --set-upstream
1640-
--recurse-submodules=
1660+
--force-with-lease --force-with-lease= --recurse-submodules=
16411661
"
16421662
return
16431663
;;

0 commit comments

Comments
 (0)