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 <vapier@google.com>
Tested-by: Xin Li <delphij@google.com>
diff --git a/subcmds/sync.py b/subcmds/sync.py
index 82eb569..bd5ffd0 100644
--- a/subcmds/sync.py
+++ b/subcmds/sync.py
@@ -960,7 +960,7 @@
     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,