checkout: Add clarifying comment
Change-Id: I76bec607abab62f630cb0265754252670b297947
Reviewed-on: https://pigweed-review.googlesource.com/c/infra/recipes/+/194990
Reviewed-by: Danielle Kay <danikay@google.com>
Pigweed-Auto-Submit: Rob Mohr <mohrr@google.com>
Commit-Queue: Auto-Submit <auto-submit@pigweed-service-accounts.iam.gserviceaccount.com>
diff --git a/recipe_modules/checkout/api.py b/recipe_modules/checkout/api.py
index 7fe4c2a..6baed84 100644
--- a/recipe_modules/checkout/api.py
+++ b/recipe_modules/checkout/api.py
@@ -756,6 +756,10 @@
with self.m.context(infra_steps=True):
# Change "https://foo.googlesource.com/bar"
# to "https___foo_googlesource_com_bar".
+ # In Android Repo Tool projects, the remote for the manifest is
+ # often configured in a way that seems incorrect. Instead of
+ # relying on it, create a whole new remote every time that is
+ # always correct.
remote = re.sub(r'[^\w]', '_', change.remote)
remote_branch = '/'.join((remote, change.branch))
self.m.git(