diff options
author | Allen Webb <allenwebb@google.com> | 2020-07-16 10:53:04 -0500 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-07-20 17:06:43 +0000 |
commit | 7b9d2ba0c68bd53dc38085c961005d2b406a7718 (patch) | |
tree | 614e8e5e0b2309e4face7971c7841e90b46097f5 | |
parent | 916add28cdd83fddfb7f0a1c274b25b9547c2ebb (diff) | |
download | toolchain-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>
-rw-r--r-- | cros_utils/misc.py | 3 | ||||
-rwxr-xr-x | setup_chromeos.py | 2 |
2 files changed, 3 insertions, 2 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 = [] diff --git a/setup_chromeos.py b/setup_chromeos.py index 63206492..07c7530d 100755 --- a/setup_chromeos.py +++ b/setup_chromeos.py @@ -244,7 +244,7 @@ Default is 'latest_lkgm'.""") return cmd_executer.RunCommand( 'git ls-remote ' 'https://chrome-internal.googlesource.com/chrome/src-internal.git ' - '> /dev/null') + 'refs/HEAD > /dev/null') if __name__ == '__main__': |