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>
This commit is contained in:

committed by
Junio C Hamano

parent
c89c494240
commit
b57e8119e6
@ -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"
|
||||
;;
|
||||
|
Reference in New Issue
Block a user