diff --git a/subcmds/sync.py b/subcmds/sync.py index 4898430..707c5bb 100644 --- a/subcmds/sync.py +++ b/subcmds/sync.py @@ -986,10 +986,11 @@ later is required to fix a server side protocol bug. load_local_manifests = not self.manifest.HasLocalManifests use_superproject = git_superproject.UseSuperproject(opt, self.manifest) - if self.manifest.IsMirror or self.manifest.IsArchive: + if use_superproject and (self.manifest.IsMirror or self.manifest.IsArchive): # Don't use superproject, because we have no working tree. use_superproject = False - print('Defaulting to no-use-superproject because there is no working tree.') + if opt.use_superproject is not None: + print('Defaulting to no-use-superproject because there is no working tree.') superproject_logging_data = { 'superproject': use_superproject, 'haslocalmanifests': bool(self.manifest.HasLocalManifests),