diff options
author | LaMont Jones <lamontjones@google.com> | 2022-05-20 09:11:54 +0000 |
---|---|---|
committer | LaMont Jones <lamontjones@google.com> | 2022-05-20 11:01:28 +0000 |
commit | 0ddb6776110aaefee3f93cc171d11dcdc12d082b (patch) | |
tree | 0c1c27860698e2593c33dfadb1665b0adfd847ca /project.py | |
parent | 501733c2abb1180679f25b2f78970d73a2f8d413 (diff) | |
download | git-repo-0ddb6776110aaefee3f93cc171d11dcdc12d082b.tar.gz |
project: fix --use-superproject logic for init.
If init was run with --use-superproject, init failed.
If init was run without --{no,}use-superproject option then manifests
with <superproject/> elements were mishandled.
Bug: b/233226285
Test: manual
Change-Id: I737e71c89d2d7c324114f58bf2dc82b40e5beba7
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/337534
Reviewed-by: Mike Frysinger <vapier@google.com>
Tested-by: LaMont Jones <lamontjones@google.com>
Diffstat (limited to 'project.py')
-rw-r--r-- | project.py | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -3790,10 +3790,10 @@ class ManifestProject(MetaProject): | |||
3790 | outer_manifest=False, | 3790 | outer_manifest=False, |
3791 | ) | 3791 | ) |
3792 | 3792 | ||
3793 | # Lastly, clone the superproject(s). | 3793 | # Lastly, if the manifest has a <superproject> then have the superproject |
3794 | if self.manifest.manifestProject.use_superproject: | 3794 | # sync it if it will be used. |
3795 | sync_result = Superproject( | 3795 | if self.manifest.superproject: |
3796 | self.manifest, self.manifest.repodir, git_event_log, quiet=not verbose).Sync() | 3796 | sync_result = self.manifest.superproject.Sync(git_event_log) |
3797 | if not sync_result.success: | 3797 | if not sync_result.success: |
3798 | print('warning: git update of superproject for ' | 3798 | print('warning: git update of superproject for ' |
3799 | f'{self.manifest.path_prefix} failed, repo sync will not use ' | 3799 | f'{self.manifest.path_prefix} failed, repo sync will not use ' |