summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--b4/__init__.py8
-rw-r--r--b4/attest.py3
2 files changed, 5 insertions, 6 deletions
diff --git a/b4/__init__.py b/b4/__init__.py
index 624e262..ae01555 100644
--- a/b4/__init__.py
+++ b/b4/__init__.py
@@ -519,8 +519,8 @@ class LoreSeries:
raise KeyError('Cherrypick not in series')
if lmsg is not None:
- if self.has_cover and covertrailers and self.patches[0].followup_trailers:
- lmsg.followup_trailers += self.patches[0].followup_trailers
+ if self.has_cover and covertrailers and self.patches[0].followup_trailers: # noqa
+ lmsg.followup_trailers += self.patches[0].followup_trailers # noqa
if addmysob:
lmsg.followup_trailers.append(('Signed-off-by',
'%s <%s>' % (usercfg['name'], usercfg['email']), None, None))
@@ -1149,9 +1149,7 @@ class LoreMessage:
return
fline = out.split('\n')[0]
if len(fline) < 40:
- # Not sure what that is
- return
- self.git_patch_id = fline[:40]
+ self.git_patch_id = fline[:40]
msg_out = mkstemp()
patch_out = mkstemp()
diff --git a/b4/attest.py b/b4/attest.py
index 672b0e1..8c98491 100644
--- a/b4/attest.py
+++ b/b4/attest.py
@@ -32,7 +32,6 @@ def in_header_attest(lmsg: b4.LoreMessage, mode: str = 'pgp', replace: bool = Fa
hparts = [
'v=1',
'h=sha256',
- f'g={lmsg.git_patch_id}',
f'i={lmsg.attestation.ib}',
f'm={lmsg.attestation.mb}',
f'p={lmsg.attestation.pb}',
@@ -77,6 +76,8 @@ def in_header_attest(lmsg: b4.LoreMessage, mode: str = 'pgp', replace: bool = Fa
shdr = email.header.make_header([(shval.encode(), 'us-ascii')], maxlinelen=78)
lmsg.msg[b4.HDR_PATCH_HASHES] = hhdr
lmsg.msg[b4.HDR_PATCH_SIG] = shdr
+ if lmsg.git_patch_id:
+ lmsg.msg['X-Git-Patch-Id'] = lmsg.git_patch_id
def header_splitter(longstr: str, limit: int = 77) -> str: