project: clean up error message

Superproject update failures on single-manifest checkouts had an extra
space.

Bug: b/254523816
Change-Id: I6f71e42337e324a6975c5d6bba487f83abaf054f
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/357056
Tested-by: LaMont Jones <lamontjones@google.com>
Reviewed-by: Xin Li <delphij@google.com>
This commit is contained in:
LaMont Jones 2023-01-31 22:13:24 +00:00
parent 2aa5d32d70
commit 7f44d366d0

View File

@ -3932,12 +3932,14 @@ class ManifestProject(MetaProject):
if git_superproject.UseSuperproject(use_superproject, self.manifest): if git_superproject.UseSuperproject(use_superproject, self.manifest):
sync_result = self.manifest.superproject.Sync(git_event_log) sync_result = self.manifest.superproject.Sync(git_event_log)
if not sync_result.success: if not sync_result.success:
print('warning: git update of superproject for ' submanifest = ''
f'{self.manifest.path_prefix} failed, repo sync will not use ' if self.manifest.path_prefix:
'superproject to fetch source; while this error is not fatal, ' submanifest = f'for {self.manifest.path_prefix} '
'and you can continue to run repo sync, please run repo init ' print(f'warning: git update of superproject {submanifest}failed, repo '
'with the --no-use-superproject option to stop seeing this ' 'sync will not use superproject to fetch source; while this '
'warning', file=sys.stderr) 'error is not fatal, and you can continue to run repo sync, '
'please run repo init with the --no-use-superproject option to '
'stop seeing this warning', file=sys.stderr)
if sync_result.fatal and use_superproject is not None: if sync_result.fatal and use_superproject is not None:
return False return False