aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRob Herring <robh@kernel.org>2023-03-30 15:15:29 -0500
committerKonstantin Ryabitsev <konstantin@linuxfoundation.org>2023-05-26 14:21:33 -0400
commit3151f4267ec4c711db47c14c3460e36b8d3d05b3 (patch)
tree6037d42c0256e312d86074b059b0b136e65fd5f8
parentbf2bb043b60cd8907f144a2d646c799c882ec711 (diff)
downloadb4-3151f4267ec4c711db47c14c3460e36b8d3d05b3.tar.gz
ez: Fix 'trailers -F' used on a single commit
Running 'b4 trailers -u -F <msgid>' on a single commit fails: CRITICAL: Failed to convert range to patches: Could not run rev-list None~1..409ee53c38a1d9a60e76ffa92088cfad07cea850 The problem is the loop is exited after 1 iteration and prevcommit is never set. Signed-off-by: Rob Herring <robh@kernel.org> Link: https://msgid.link/20230330201529.2744290-1-robh@kernel.org Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
-rw-r--r--b4/ez.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/b4/ez.py b/b4/ez.py
index d0c0667..fdb7d88 100644
--- a/b4/ez.py
+++ b/b4/ez.py
@@ -834,6 +834,8 @@ def update_trailers(cmdargs: argparse.Namespace) -> None:
break
prevparent = parent
prevcommit = commit
+ if prevcommit is None:
+ prevcommit = end
start = f'{prevcommit}~1'
else:
logger.critical('CRITICAL: Please specify -F msgid to look up trailers from remote.')