aboutsummaryrefslogtreecommitdiff
path: root/cros_utils
diff options
context:
space:
mode:
authorAllen Webb <allenwebb@google.com>2020-07-16 10:53:04 -0500
committerCommit Bot <commit-bot@chromium.org>2020-07-20 17:06:43 +0000
commit7b9d2ba0c68bd53dc38085c961005d2b406a7718 (patch)
tree614e8e5e0b2309e4face7971c7841e90b46097f5 /cros_utils
parent916add28cdd83fddfb7f0a1c274b25b9547c2ebb (diff)
downloadtoolchain-utils-7b9d2ba0c68bd53dc38085c961005d2b406a7718.tar.gz
Put reference filters on 'git ls-remote'.
This saves time and bandwidth expecially as the number of references scale up with uploaded CLs. BUG=None TEST=CQ passes Change-Id: Idf0e9eea97bc533ec21f29cfd8267a260f7322ef Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/2302949 Reviewed-by: Tiancong Wang <tcwang@google.com> Commit-Queue: Allen Webb <allenwebb@google.com> Tested-by: Allen Webb <allenwebb@google.com>
Diffstat (limited to 'cros_utils')
-rw-r--r--cros_utils/misc.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/cros_utils/misc.py b/cros_utils/misc.py
index d8b47d19..93d1b3b6 100644
--- a/cros_utils/misc.py
+++ b/cros_utils/misc.py
@@ -31,7 +31,8 @@ def GetChromeOSVersionFromLSBVersion(lsb_version):
"""Get Chromeos version from Lsb version."""
ce = command_executer.GetCommandExecuter()
command = ('git ls-remote '
- 'https://chromium.googlesource.com/chromiumos/manifest.git')
+ 'https://chromium.googlesource.com/chromiumos/manifest.git '
+ 'refs/heads/release-R*')
ret, out, _ = ce.RunCommandWOutput(command, print_to_console=False)
assert ret == 0, 'Command %s failed' % command
lower = []