From e39d8b36f6bee37424712a9b6ba7765183175c5e Mon Sep 17 00:00:00 2001 From: Xin Li Date: Tue, 13 Jul 2021 18:21:49 +0000 Subject: [PATCH] Fix an issue that repo can't see projects declared in a local manifest. When loading of superproject failed, we were resetting the manifest to None, and later code would reload the manifest to see if there are submodules, which would load the non-local manifest, causing sync with superproject to fail. Address this by setting the manifest_name to opt.manifest_name instead. Bug: [google internal] b/189139268 Change-Id: I3616512e1c4b73e7eca0d83fd1fc474b825adbbf Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/311102 Reviewed-by: Mike Frysinger Tested-by: Xin Li --- subcmds/sync.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subcmds/sync.py b/subcmds/sync.py index 82eb569c..bd5ffd0c 100644 --- a/subcmds/sync.py +++ b/subcmds/sync.py @@ -960,7 +960,7 @@ later is required to fix a server side protocol bug. if git_superproject.UseSuperproject(opt, self.manifest): new_manifest_name = self._UpdateProjectsRevisionId(opt, args, load_local_manifests) if not new_manifest_name: - manifest_name = new_manifest_name + manifest_name = opt.manifest_name if self.gitc_manifest: gitc_manifest_projects = self.GetProjects(args,