Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
completion: complete `git push --force-with-lease=`
author
John Keeping
<john@keeping.me.uk>
Tue, 22 Jul 2014 18:24:58 +0000
(19:24 +0100)
committer
Junio C Hamano
<gitster@pobox.com>
Tue, 22 Jul 2014 20:30:30 +0000
(13:30 -0700)
Signed-off-by: John Keeping <john@keeping.me.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/completion/git-completion.bash
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
9e8a6a9
)
diff --git
a/contrib/completion/git-completion.bash
b/contrib/completion/git-completion.bash
index 4a4ce7be2576d1885f6b34b1cdad27a9c845f8fb..5ba24ee106df61ba052e8db80a2b98ccc32ca059 100644
(file)
--- 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_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
_git_push ()
{
case "$prev" in
@@
-1632,12
+1648,16
@@
_git_push ()
__gitcomp "$__git_push_recurse_submodules" "" "${cur##--recurse-submodules=}"
return
;;
__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
--*)
__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
;;
"
return
;;