mirror of
https://gerrit.googlesource.com/git-repo
synced 2024-12-21 07:16:21 +00:00
init: add missing submodule arg
The submodule argument to Sync_LocalHalf was missing in MetaBranchSwitch, causing submodules not to get synced when the -b/--manifest-branch argument to init is used. Change-Id: Ie86d271abac2020725770be36ead83be3326e64b Signed-off-by: Martin Kelly <mkelly@xevo.com>
This commit is contained in:
parent
b54343d9fd
commit
224a31a765
@ -2958,14 +2958,14 @@ class MetaProject(Project):
|
|||||||
self.revisionExpr = base
|
self.revisionExpr = base
|
||||||
self.revisionId = None
|
self.revisionId = None
|
||||||
|
|
||||||
def MetaBranchSwitch(self):
|
def MetaBranchSwitch(self, submodules=False):
|
||||||
""" Prepare MetaProject for manifest branch switch
|
""" Prepare MetaProject for manifest branch switch
|
||||||
"""
|
"""
|
||||||
|
|
||||||
# detach and delete manifest branch, allowing a new
|
# detach and delete manifest branch, allowing a new
|
||||||
# branch to take over
|
# branch to take over
|
||||||
syncbuf = SyncBuffer(self.config, detach_head=True)
|
syncbuf = SyncBuffer(self.config, detach_head=True)
|
||||||
self.Sync_LocalHalf(syncbuf)
|
self.Sync_LocalHalf(syncbuf, submodules=submodules)
|
||||||
syncbuf.Finish()
|
syncbuf.Finish()
|
||||||
|
|
||||||
return GitCommand(self,
|
return GitCommand(self,
|
||||||
|
@ -256,7 +256,7 @@ to update the working directory files.
|
|||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
if opt.manifest_branch:
|
if opt.manifest_branch:
|
||||||
m.MetaBranchSwitch()
|
m.MetaBranchSwitch(submodules=opt.submodules)
|
||||||
|
|
||||||
syncbuf = SyncBuffer(m.config)
|
syncbuf = SyncBuffer(m.config)
|
||||||
m.Sync_LocalHalf(syncbuf, submodules=opt.submodules)
|
m.Sync_LocalHalf(syncbuf, submodules=opt.submodules)
|
||||||
|
Loading…
Reference in New Issue
Block a user