diff options
author | Junio C Hamano <gitster@pobox.com> | 2014-03-14 14:24:15 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-03-14 14:24:15 -0700 |
commit | baf9e83c2105527a75c2838d63e290ec87712ca6 (patch) | |
tree | b2d3692485fb01ca693811a2723c54b31d37555f /contrib/completion | |
parent | dfcd354cdf38ff119c05e6e5f0e434bbc163ba41 (diff) | |
parent | 4dd5c4709a51bb704c2c7fb59170b494b76daab9 (diff) | |
download | git-baf9e83c2105527a75c2838d63e290ec87712ca6.tar.gz git-baf9e83c2105527a75c2838d63e290ec87712ca6.tar.xz |
Merge branch 'ss/completion-rec-sub-fetch-push'
* ss/completion-rec-sub-fetch-push:
completion: teach --recurse-submodules to fetch, pull and push
Diffstat (limited to 'contrib/completion')
-rw-r--r-- | contrib/completion/git-completion.bash | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index 9525343fc..87de809d2 100644 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -1221,14 +1221,20 @@ _git_difftool () __git_complete_revlist_file } +__git_fetch_recurse_submodules="yes on-demand no" + __git_fetch_options=" --quiet --verbose --append --upload-pack --force --keep --depth= - --tags --no-tags --all --prune --dry-run + --tags --no-tags --all --prune --dry-run --recurse-submodules= " _git_fetch () { case "$cur" in + --recurse-submodules=*) + __gitcomp "$__git_fetch_recurse_submodules" "" "${cur##--recurse-submodules=}" + return + ;; --*) __gitcomp "$__git_fetch_options" return @@ -1583,6 +1589,10 @@ _git_pull () __git_complete_strategy && return case "$cur" in + --recurse-submodules=*) + __gitcomp "$__git_fetch_recurse_submodules" "" "${cur##--recurse-submodules=}" + return + ;; --*) __gitcomp " --rebase --no-rebase @@ -1595,6 +1605,8 @@ _git_pull () __git_complete_remote_or_refspec } +__git_push_recurse_submodules="check on-demand" + _git_push () { case "$prev" in @@ -1607,10 +1619,15 @@ _git_push () __gitcomp_nl "$(__git_remotes)" "" "${cur##--repo=}" return ;; + --recurse-submodules=*) + __gitcomp "$__git_push_recurse_submodules" "" "${cur##--recurse-submodules=}" + return + ;; --*) __gitcomp " --all --mirror --tags --dry-run --force --verbose --receive-pack= --repo= --set-upstream + --recurse-submodules= " return ;; |