Follow up "Fix shallow clones when upstream attribute is present"
This reverts commit 38d2fe11b9
.
Reason for revert: The issue described in I00acd4c61 remains unresolved.
The previous fix incorrectly accessed use_superproject from the Project
class, though it was only defined in ManifestProject. This change uses
it from the manifest attr available in the Project class.
Bug: b/427093249
Change-Id: Ife6d46cd85840f2989f60c2ca4d5a7dcf5d7477a
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/508821
Reviewed-by: Xin Li <delphij@google.com>
Reviewed-by: Krzysztof Wesolowski <krzysztof.wesolowski@volvocars.com>
Commit-Queue: Kaushik Lingarkar <kaushikl@qti.qualcomm.com>
Reviewed-by: Gavin Mak <gavinmak@google.com>
Tested-by: Kaushik Lingarkar <kaushikl@qti.qualcomm.com>
This commit is contained in:
parent
d30414bb53
commit
67383bdba9
1 changed files with 6 additions and 2 deletions
|
@ -2411,7 +2411,9 @@ class Project:
|
||||||
# throws an error.
|
# throws an error.
|
||||||
revs = [f"{self.revisionExpr}^0"]
|
revs = [f"{self.revisionExpr}^0"]
|
||||||
upstream_rev = None
|
upstream_rev = None
|
||||||
if self.upstream:
|
|
||||||
|
# Only check upstream when using superproject.
|
||||||
|
if self.upstream and self.manifest.manifestProject.use_superproject:
|
||||||
upstream_rev = self.GetRemote().ToLocal(self.upstream)
|
upstream_rev = self.GetRemote().ToLocal(self.upstream)
|
||||||
revs.append(upstream_rev)
|
revs.append(upstream_rev)
|
||||||
|
|
||||||
|
@ -2423,7 +2425,9 @@ class Project:
|
||||||
log_as_error=False,
|
log_as_error=False,
|
||||||
)
|
)
|
||||||
|
|
||||||
if self.upstream:
|
# Only verify upstream relationship for superproject scenarios
|
||||||
|
# without affecting plain usage.
|
||||||
|
if self.upstream and self.manifest.manifestProject.use_superproject:
|
||||||
self.bare_git.merge_base(
|
self.bare_git.merge_base(
|
||||||
"--is-ancestor",
|
"--is-ancestor",
|
||||||
self.revisionExpr,
|
self.revisionExpr,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue