summaryrefslogtreecommitdiff
path: root/contrib/completion
diff options
context:
space:
mode:
authorDenton Liu <liu.denton@gmail.com>2019-02-08 11:21:34 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-04-10 03:07:16 (GMT)
commitb57e8119e6e08f731308923ef2b033eb45152bc6 (patch)
tree002d5e1bd591e098359d2b3b3c226342045468d0 /contrib/completion
parentc89c494240a516b082f397130ae44df2e757866b (diff)
downloadgit-b57e8119e6e08f731308923ef2b033eb45152bc6.zip
git-b57e8119e6e08f731308923ef2b033eb45152bc6.tar.gz
git-b57e8119e6e08f731308923ef2b033eb45152bc6.tar.bz2
submodule: teach set-branch subcommand
This teaches git-submodule the set-branch subcommand which allows the branch of a submodule to be set through a porcelain command without having to manually manipulate the .gitmodules file. Signed-off-by: Denton Liu <liu.denton@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/completion')
-rw-r--r--contrib/completion/git-completion.bash5
1 files changed, 4 insertions, 1 deletions
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 499e56f..8b3b5a9 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -2573,7 +2573,7 @@ _git_submodule ()
{
__git_has_doubledash && return
- local subcommands="add status init deinit update summary foreach sync"
+ local subcommands="add status init deinit update set-branch summary foreach sync"
local subcommand="$(__git_find_on_cmdline "$subcommands")"
if [ -z "$subcommand" ]; then
case "$cur" in
@@ -2604,6 +2604,9 @@ _git_submodule ()
--force --rebase --merge --reference --depth --recursive --jobs
"
;;
+ set-branch,--*)
+ __gitcomp "--default --branch"
+ ;;
summary,--*)
__gitcomp "--cached --files --summary-limit"
;;