diff options
author | Konstantin Ryabitsev <konstantin@linuxfoundation.org> | 2022-08-19 16:26:14 -0400 |
---|---|---|
committer | Konstantin Ryabitsev <konstantin@linuxfoundation.org> | 2022-08-19 16:35:17 -0400 |
commit | 06fd3bb3494d305e862c226a1398b47a23fcbff0 (patch) | |
tree | 78ce2a701f601d9a7fbe061e3204fc776cf5faed | |
parent | 1c51bebcfa329b2fb9cfae1107427399698817c5 (diff) | |
download | b4-06fd3bb3494d305e862c226a1398b47a23fcbff0.tar.gz |
ez: fix logic error when using arbitrary threads for trailer updates
Fixes a logic error that was picking the wrong starting commit in
the "most recent contiguous range of our commits".
Reported-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://msgid.link/e2ca58f1-3c10-0dc6-ebdb-3ca088b430d7@conchuod.ie
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
-rw-r--r-- | b4/ez.py | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -650,9 +650,7 @@ def update_trailers(cmdargs: argparse.Namespace) -> None: logger.critical('CRITICAL: could not find any commits where committer=%s', myemail) sys.exit(1) - prevparent = None - end = None - commit = None + prevparent = prevcommit = end = None for line in lines: commit, parent = line.split() if end is None: @@ -660,10 +658,13 @@ def update_trailers(cmdargs: argparse.Namespace) -> None: if prevparent is None: prevparent = parent continue + if prevcommit is None: + prevcommit = commit if prevparent != commit: break prevparent = parent - start = f'{commit}~1' + prevcommit = commit + start = f'{prevcommit}~1' else: logger.critical('CRITICAL: Please specify -F msgid to look up trailers from remote.') sys.exit(1) |