aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonstantin Ryabitsev <konstantin@linuxfoundation.org>2022-08-31 17:07:20 -0400
committerKonstantin Ryabitsev <konstantin@linuxfoundation.org>2022-08-31 17:07:20 -0400
commit6094d8fc8c193b27df8bf74826076dd8d26e0c42 (patch)
tree6668aff6f203cbd7a5190508810b5fa4f154b3d5
parentfb14c834db42b35ac71c53ba78ffaed49b9d05cf (diff)
downloadb4-6094d8fc8c193b27df8bf74826076dd8d26e0c42.tar.gz
Fix regression with b4 trailers -u
Fixes regression introduced by trailers refactor. Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
-rw-r--r--b4/__init__.py2
-rw-r--r--b4/ez.py13
2 files changed, 7 insertions, 8 deletions
diff --git a/b4/__init__.py b/b4/__init__.py
index 4062ec3..7439fb8 100644
--- a/b4/__init__.py
+++ b/b4/__init__.py
@@ -1719,7 +1719,7 @@ class LoreMessage:
logger.info(' + %s%s', ltr.as_string(omit_extinfo=True), extra)
- if addmysob:
+ if addmysob or hasmysob:
# Tack on our signoff at the bottom
fixtrailers.append(sobtr)
if not hasmysob:
diff --git a/b4/ez.py b/b4/ez.py
index 965ae6e..12dbf2c 100644
--- a/b4/ez.py
+++ b/b4/ez.py
@@ -720,18 +720,17 @@ def update_trailers(cmdargs: argparse.Namespace) -> None:
continue
parts = b4.LoreMessage.get_body_parts(commit_map[commit].get_payload())
- for ftrailer in addtrailers:
- if ftrailer[:3] not in parts[2]:
+ for fltr in addtrailers:
+ if fltr not in parts[2]:
if commit not in updates:
updates[commit] = list()
- updates[commit].append(ftrailer)
+ updates[commit].append(fltr)
# Check if we've applied mismatched trailers already
if not cmdargs.sloppytrailers and mismatches:
- for mtrailer in list(mismatches):
- check = (mtrailer[0], mtrailer[1], None)
- if check in parts[2]:
+ for mltr in list(mismatches):
+ if mltr in parts[2]:
logger.debug('Removing already-applied mismatch %s', check)
- mismatches.remove(mtrailer)
+ mismatches.remove(mltr)
if len(mismatches):
logger.critical('---')