diff options
author | George Burgess IV <gbiv@google.com> | 2020-12-07 09:53:22 -0800 |
---|---|---|
committer | George Burgess <gbiv@chromium.org> | 2020-12-07 18:03:44 +0000 |
commit | 9d35abcfd61e3b23d40d3a30c3f880398fc86239 (patch) | |
tree | 345642a59926a7fe48525269efb222ee26ddeabe /llvm_tools | |
parent | 369072a8f00b80132a6442e5c3cb28d014e360c4 (diff) | |
download | toolchain-utils-9d35abcfd61e3b23d40d3a30c3f880398fc86239.tar.gz |
llvm_tools: update upstream branch names to point to `main`
LLVM recently renamed their `master` branch to `main` upstream. This
changes our tooling to search for the latter name instead.
BUG=None
TEST=Unittests; ran `git llvm-rev --sha HEAD` in an up-to-date llvm
repo.
Change-Id: Icdc6dac48fda7697d18d0d77935e46670273bf84
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/2577643
Reviewed-by: Manoj Gupta <manojgupta@chromium.org>
Tested-by: George Burgess <gbiv@chromium.org>
Diffstat (limited to 'llvm_tools')
-rwxr-xr-x | llvm_tools/get_llvm_hash.py | 2 | ||||
-rwxr-xr-x | llvm_tools/git_llvm_rev.py | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/llvm_tools/get_llvm_hash.py b/llvm_tools/get_llvm_hash.py index 4c479962..329e8292 100755 --- a/llvm_tools/get_llvm_hash.py +++ b/llvm_tools/get_llvm_hash.py @@ -293,7 +293,7 @@ class LLVMHash(object): def GetTopOfTrunkGitHash(self): """Gets the latest git hash from top of trunk of LLVM.""" - path_to_main_branch = 'refs/heads/master' + path_to_main_branch = 'refs/heads/main' llvm_tot_git_hash = check_output( ['git', 'ls-remote', _LLVM_GIT_URL, path_to_main_branch]) return llvm_tot_git_hash.rstrip().split()[0] diff --git a/llvm_tools/git_llvm_rev.py b/llvm_tools/git_llvm_rev.py index 07209f1e..c8c1505c 100755 --- a/llvm_tools/git_llvm_rev.py +++ b/llvm_tools/git_llvm_rev.py @@ -7,7 +7,7 @@ """Maps LLVM git SHAs to synthetic revision numbers and back. Revision numbers are all of the form '(branch_name, r1234)'. As a shorthand, -r1234 is parsed as '(master, 1234)'. +r1234 is parsed as '(main, 1234)'. """ from __future__ import print_function @@ -18,7 +18,7 @@ import subprocess import sys import typing as t -MAIN_BRANCH = 'master' +MAIN_BRANCH = 'main' # Note that after base_llvm_sha, we reach The Wild West(TM) of commits. # So reasonable input that could break us includes: |