diff --git a/project.py b/project.py index 269fd7e5..9a795272 100644 --- a/project.py +++ b/project.py @@ -2958,14 +2958,14 @@ class MetaProject(Project): self.revisionExpr = base self.revisionId = None - def MetaBranchSwitch(self): + def MetaBranchSwitch(self, submodules=False): """ Prepare MetaProject for manifest branch switch """ # detach and delete manifest branch, allowing a new # branch to take over syncbuf = SyncBuffer(self.config, detach_head=True) - self.Sync_LocalHalf(syncbuf) + self.Sync_LocalHalf(syncbuf, submodules=submodules) syncbuf.Finish() return GitCommand(self, diff --git a/subcmds/init.py b/subcmds/init.py index 65dfd1fd..46cdd23a 100644 --- a/subcmds/init.py +++ b/subcmds/init.py @@ -256,7 +256,7 @@ to update the working directory files. sys.exit(1) if opt.manifest_branch: - m.MetaBranchSwitch() + m.MetaBranchSwitch(submodules=opt.submodules) syncbuf = SyncBuffer(m.config) m.Sync_LocalHalf(syncbuf, submodules=opt.submodules)