aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonstantin Ryabitsev <konstantin@linuxfoundation.org>2022-08-19 16:26:14 -0400
committerKonstantin Ryabitsev <konstantin@linuxfoundation.org>2022-08-19 16:35:17 -0400
commit06fd3bb3494d305e862c226a1398b47a23fcbff0 (patch)
tree78ce2a701f601d9a7fbe061e3204fc776cf5faed
parent1c51bebcfa329b2fb9cfae1107427399698817c5 (diff)
downloadb4-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.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/b4/ez.py b/b4/ez.py
index 3615130..05b9081 100644
--- a/b4/ez.py
+++ b/b4/ez.py
@@ -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)