summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar John Keeping <john@keeping.me.uk>2014-07-22 19:24:58 +0100
committerLibravatar Junio C Hamano <gitster@pobox.com>2014-07-22 13:30:30 -0700
commitaaf7253f84477d4be9b56072804e53c3098aaa90 (patch)
tree5b4df274a45aa58de1cf26d4b146ccddd89f6536
parentcompletion: add some missing options to `git push` (diff)
downloadtgif-aaf7253f84477d4be9b56072804e53c3098aaa90.tar.xz
completion: complete `git push --force-with-lease=`
Signed-off-by: John Keeping <john@keeping.me.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--contrib/completion/git-completion.bash22
1 files changed, 21 insertions, 1 deletions
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 4a4ce7be25..5ba24ee106 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -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
@@ -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
;;