diff options
author | Martin Kelly <mkelly@xevo.com> | 2017-07-10 14:46:25 -0700 |
---|---|---|
committer | Martin Kelly <mkelly@xevo.com> | 2017-07-10 14:50:52 -0700 |
commit | 224a31a765eb943443640301a715d2d4eb005b79 (patch) | |
tree | e32deed53d2576e43f8250d22c2a0e44f7e5d558 | |
parent | b54343d9fd682bcdb1510042d93fdf38979b9eb7 (diff) | |
download | git-repo-224a31a765eb943443640301a715d2d4eb005b79.tar.gz |
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>
-rw-r--r-- | project.py | 4 | ||||
-rw-r--r-- | subcmds/init.py | 2 |
2 files changed, 3 insertions, 3 deletions
@@ -2958,14 +2958,14 @@ class MetaProject(Project): | |||
2958 | self.revisionExpr = base | 2958 | self.revisionExpr = base |
2959 | self.revisionId = None | 2959 | self.revisionId = None |
2960 | 2960 | ||
2961 | def MetaBranchSwitch(self): | 2961 | def MetaBranchSwitch(self, submodules=False): |
2962 | """ Prepare MetaProject for manifest branch switch | 2962 | """ Prepare MetaProject for manifest branch switch |
2963 | """ | 2963 | """ |
2964 | 2964 | ||
2965 | # detach and delete manifest branch, allowing a new | 2965 | # detach and delete manifest branch, allowing a new |
2966 | # branch to take over | 2966 | # branch to take over |
2967 | syncbuf = SyncBuffer(self.config, detach_head=True) | 2967 | syncbuf = SyncBuffer(self.config, detach_head=True) |
2968 | self.Sync_LocalHalf(syncbuf) | 2968 | self.Sync_LocalHalf(syncbuf, submodules=submodules) |
2969 | syncbuf.Finish() | 2969 | syncbuf.Finish() |
2970 | 2970 | ||
2971 | return GitCommand(self, | 2971 | 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. | |||
256 | sys.exit(1) | 256 | sys.exit(1) |
257 | 257 | ||
258 | if opt.manifest_branch: | 258 | if opt.manifest_branch: |
259 | m.MetaBranchSwitch() | 259 | m.MetaBranchSwitch(submodules=opt.submodules) |
260 | 260 | ||
261 | syncbuf = SyncBuffer(m.config) | 261 | syncbuf = SyncBuffer(m.config) |
262 | m.Sync_LocalHalf(syncbuf, submodules=opt.submodules) | 262 | m.Sync_LocalHalf(syncbuf, submodules=opt.submodules) |