* `b4` drops added trailers with peculiar patch
@ 2026-01-04 20:10 Miguel Ojeda
2026-03-06 0:58 ` Konstantin Ryabitsev
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Miguel Ojeda @ 2026-01-04 20:10 UTC (permalink / raw)
To: Konstantin Ryabitsev; +Cc: tools
Hi Konstantin,
I just noticed that trying to use `shazam` on:
https://lore.kernel.org/rust-for-linux/20251201165601.31484-1-atharvd440@gmail.com/
would not add the trailers, including Link, SoB, etc.
Poking around inside `b4`, I noticed that the patch has an space in
the `---` line.
The message is probably considered broken, but it means that
`get_body_parts()` will split unexpectedly and then the trailers will
be added after the `---` line.
So, later, when `b4` uses `git am` to apply, they get discarded
without warning :(
Would it make sense to try to notice potentially broken patches? I
know that kind of path is fraught with tears, but two ideas:
- Double-check that the trailers are actually in the created commit,
and if not, sound the alarm, because something is not OK somewhere.
- Perhaps a new case in that `if...elif...elif` with a pattern like
`^--- +\n`. Or perhaps even an `else` that warns if things look odd?
Thanks!
Cheers,
Miguel
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: `b4` drops added trailers with peculiar patch
2026-01-04 20:10 `b4` drops added trailers with peculiar patch Miguel Ojeda
@ 2026-03-06 0:58 ` Konstantin Ryabitsev
2026-03-06 1:15 ` Miguel Ojeda
2026-03-06 1:06 ` B4 Bugbot
2026-03-06 19:45 ` B4 Bugbot
2 siblings, 1 reply; 5+ messages in thread
From: Konstantin Ryabitsev @ 2026-03-06 0:58 UTC (permalink / raw)
To: Miguel Ojeda; +Cc: tools
On Sun, Jan 04, 2026 at 09:10:44PM +0100, Miguel Ojeda wrote:
> I just noticed that trying to use `shazam` on:
>
> https://lore.kernel.org/rust-for-linux/20251201165601.31484-1-atharvd440@gmail.com/
>
> would not add the trailers, including Link, SoB, etc.
Thanks for the report. I haven't ignored it, I swear!
(Well, I have, but not permanently.)
bugspray tag b4/shazam
--
KR
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: `b4` drops added trailers with peculiar patch
2026-01-04 20:10 `b4` drops added trailers with peculiar patch Miguel Ojeda
2026-03-06 0:58 ` Konstantin Ryabitsev
@ 2026-03-06 1:06 ` B4 Bugbot
2026-03-06 19:45 ` B4 Bugbot
2 siblings, 0 replies; 5+ messages in thread
From: B4 Bugbot @ 2026-03-06 1:06 UTC (permalink / raw)
To: tools, konstantin, miguel.ojeda.sandonis
Hello:
This conversation is now tracked by b4 bug tracker.
There is no need to do anything else, just keep talking.
--
Deet-doot-dot, I am a bot.
b4 bug tracker (bugspray 0.1-dev)
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: `b4` drops added trailers with peculiar patch
2026-01-04 20:10 `b4` drops added trailers with peculiar patch Miguel Ojeda
2026-03-06 0:58 ` Konstantin Ryabitsev
2026-03-06 1:06 ` B4 Bugbot
@ 2026-03-06 19:45 ` B4 Bugbot
2 siblings, 0 replies; 5+ messages in thread
From: B4 Bugbot @ 2026-03-06 19:45 UTC (permalink / raw)
To: miguel.ojeda.sandonis, tools, konstantin
Konstantin Ryabitsev writes in commit 6cf7adf5876a65bc019fc91aa5add0d4fd409790:
Allow trailing whitespace in patch separator line
When a patch message contains "--- " (with trailing space) instead
of a clean "---", get_body_parts() failed to split the message
correctly. This caused any follow-up trailers (Reviewed-by, Link,
Signed-off-by, etc.) to be placed after the separator, where git-am
silently discards them.
Change the regex from "^---\n" to "^---\s*\n" so trailing whitespace
on the separator line is tolerated. The rebuild_message() method
always writes a clean "---\n", so the whitespace is cleaned up
automatically.
Reported-by: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
Closes: https://msgid.link/CANiq72nLuYfoVnWGjmEmUJDKSpFJq9wUXfTND1e3cjwhe0KFFQ@mail.gmail.com # 9453f65
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
Assisted-by: claude-opus-4-6
--
Deet-doot-dot, I am a bot.
b4 bug tracker (bugspray 0.1-dev)
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-03-06 19:45 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-04 20:10 `b4` drops added trailers with peculiar patch Miguel Ojeda
2026-03-06 0:58 ` Konstantin Ryabitsev
2026-03-06 1:15 ` Miguel Ojeda
2026-03-06 1:06 ` B4 Bugbot
2026-03-06 19:45 ` B4 Bugbot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox