[llvm] 3a7ca4c - utils: fix broken assertion in revert_checker
George Burgess IV via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 15 13:08:01 PDT 2021
Author: George Burgess IV
Date: 2021-07-15T13:07:46-07:00
New Revision: 3a7ca4cad4dd42120ea39b919f45a166e85d54a8
URL: https://github.com/llvm/llvm-project/commit/3a7ca4cad4dd42120ea39b919f45a166e85d54a8
DIFF: https://github.com/llvm/llvm-project/commit/3a7ca4cad4dd42120ea39b919f45a166e85d54a8.diff
LOG: utils: fix broken assertion in revert_checker
`intermediate_commits` is a list of full SHAs, and `across_ref` may/may
not be a full SHA (or a SHA at all). We already have `across_sha`, which
is the resolved form of `across_ref`, so use that instead.
Thanks to probinson for catching this in post-commit review of
https://reviews.llvm.org/D105578!
Added:
Modified:
llvm/utils/revert_checker.py
Removed:
################################################################################
diff --git a/llvm/utils/revert_checker.py b/llvm/utils/revert_checker.py
index 813267b2a439..c61e4a3f9778 100755
--- a/llvm/utils/revert_checker.py
+++ b/llvm/utils/revert_checker.py
@@ -180,7 +180,7 @@ def find_reverts(git_dir: str, across_ref: str, root: str) -> List[Revert]:
'(common ancestor: {common_ancestor})')
intermediate_commits = set(_shas_between(git_dir, across_sha, root_sha))
- assert across_ref not in intermediate_commits
+ assert across_sha not in intermediate_commits
logging.debug('%d commits appear between %s and %s',
len(intermediate_commits), across_sha, root_sha)
More information about the llvm-commits
mailing list