mirror of
https://gerrit.googlesource.com/git-repo
synced 2026-05-30 22:49:48 +00:00
Use git_superproject.UseSuperproject() everywhere
Currently somewhere use git_superproject.UseSuperproject(), which checks both the manifest config and user's config, and otherwhere use manifest.manifestProject.use_superproject, which only checks the manifest config. This causes Inconsistent behaviors for users who do not set --use-superproject when doing repo init but have repo.superprojectChoice in their git config. Replace where using manifest.manifestProject.use_superproject with git_superproject.UseSuperproject() to respect user's config and avoid inconsistency. Bug: 454514213 Change-Id: I1f734235cdd67b8a6915f1d05967d1aaa4d03f2a Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/561801 Commit-Queue: Jacky Liu <qsliu@google.com> Reviewed-by: Mike Frysinger <vapier@google.com> Tested-by: Jacky Liu <qsliu@google.com>
This commit is contained in:
+2
-1
@@ -27,6 +27,7 @@ from error import SilentRepoExitError
|
||||
from error import UploadError
|
||||
from git_command import GitCommand
|
||||
from git_refs import R_HEADS
|
||||
import git_superproject
|
||||
from hooks import RepoHook
|
||||
from project import ReviewableBranch
|
||||
from repo_logging import RepoLogger
|
||||
@@ -627,7 +628,7 @@ Gerrit Code Review: https://www.gerritcodereview.com/
|
||||
# If using superproject, add the root repo as a push option.
|
||||
manifest = branch.project.manifest
|
||||
push_options = list(opt.push_options)
|
||||
if manifest.manifestProject.use_superproject:
|
||||
if git_superproject.UseSuperproject(None, manifest):
|
||||
sp = manifest.superproject
|
||||
if sp:
|
||||
r_id = sp.repo_id
|
||||
|
||||
Reference in New Issue
Block a user