diff options
author | Kaushik Lingarkar <kaushikl@qti.qualcomm.com> | 2025-09-09 13:14:34 -0700 |
---|---|---|
committer | LUCI <gerrit-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2025-09-22 12:40:22 -0700 |
commit | 67383bdba9105203ffeaef645fa8c53b7ca33ac8 (patch) | |
tree | 5204ba86a4fc914d1db78437b404feef25d9e3e7 /project.py | |
parent | d30414bb5331d91784c536d30e22c2ccb8126b7a (diff) | |
download | git-repo-67383bdba9105203ffeaef645fa8c53b7ca33ac8.tar.gz |
Follow up "Fix shallow clones when upstream attribute is present"
This reverts commit 38d2fe11b9df521727fcca23c9dac086ce8378d3.
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>
Diffstat (limited to 'project.py')
-rw-r--r-- | project.py | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -2411,7 +2411,9 @@ class Project: | |||
2411 | # throws an error. | 2411 | # throws an error. |
2412 | revs = [f"{self.revisionExpr}^0"] | 2412 | revs = [f"{self.revisionExpr}^0"] |
2413 | upstream_rev = None | 2413 | upstream_rev = None |
2414 | if self.upstream: | 2414 | |
2415 | # Only check upstream when using superproject. | ||
2416 | if self.upstream and self.manifest.manifestProject.use_superproject: | ||
2415 | upstream_rev = self.GetRemote().ToLocal(self.upstream) | 2417 | upstream_rev = self.GetRemote().ToLocal(self.upstream) |
2416 | revs.append(upstream_rev) | 2418 | revs.append(upstream_rev) |
2417 | 2419 | ||
@@ -2423,7 +2425,9 @@ class Project: | |||
2423 | log_as_error=False, | 2425 | log_as_error=False, |
2424 | ) | 2426 | ) |
2425 | 2427 | ||
2426 | if self.upstream: | 2428 | # Only verify upstream relationship for superproject scenarios |
2429 | # without affecting plain usage. | ||
2430 | if self.upstream and self.manifest.manifestProject.use_superproject: | ||
2427 | self.bare_git.merge_base( | 2431 | self.bare_git.merge_base( |
2428 | "--is-ancestor", | 2432 | "--is-ancestor", |
2429 | self.revisionExpr, | 2433 | self.revisionExpr, |