1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 02:33:06 +01:00

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!
This commit is contained in:
George Burgess IV 2021-07-15 13:03:27 -07:00
parent 0226799a56
commit 1c70f4b1ff

View File

@ -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)