From 1c70f4b1fff32d93b97dbc652b2a208e39e87a88 Mon Sep 17 00:00:00 2001 From: George Burgess IV Date: Thu, 15 Jul 2021 13:03:27 -0700 Subject: [PATCH] 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! --- utils/revert_checker.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/revert_checker.py b/utils/revert_checker.py index 813267b2a43..c61e4a3f977 100755 --- a/utils/revert_checker.py +++ b/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)