summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-07-30 21:21:13 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-07-30 21:21:14 (GMT)
commit0d9cb2d14e4f26c122ab2532b4ceb3e757fb87b7 (patch)
tree2d4918cd7fb59bd72d1e38f34e30ea375bd0fe75 /contrib
parentc372e7b01b6c6a9902ae5428ee1f9880a5421344 (diff)
parentaaf7253f84477d4be9b56072804e53c3098aaa90 (diff)
downloadgit-0d9cb2d14e4f26c122ab2532b4ceb3e757fb87b7.zip
git-0d9cb2d14e4f26c122ab2532b4ceb3e757fb87b7.tar.gz
git-0d9cb2d14e4f26c122ab2532b4ceb3e757fb87b7.tar.bz2
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`
Diffstat (limited to 'contrib')
-rw-r--r--contrib/completion/git-completion.bash28
1 files changed, 27 insertions, 1 deletions
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 7a6e1d7..06bf262 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -1621,12 +1621,33 @@ _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
--repo)
__gitcomp_nl "$(__git_remotes)"
return
+ ;;
+ --recurse-submodules)
+ __gitcomp "$__git_push_recurse_submodules"
+ return
+ ;;
esac
case "$cur" in
--repo=*)
@@ -1637,11 +1658,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
;;