mricon/b4

b4 send removes newlines from cover-letter

Opened this issue · 1 comments

Hello there,

Sometimes there is a value in having two empty lines in a cover-letter,
to more clearly separate certain paragraphs from other paragraphs.

Looking at the empty commit that contains the cover-letter, in e.g.:
floatious/linux@3be58ac

I can see that the cover-letter has two empty newlines in certain places, as intended.

However, if I look at the cover-letter that was actually sent to the list:
https://lore.kernel.org/linux-pci/20240424-rockchip-pcie-ep-v1-v1-0-b1a02ddad650@kernel.org/

We can see that it has actually stripped the second empty line, in the cases where there were
more than a single empty line. (With the result being that the cover-letter is harder to read IMO.)

If would be nice if b4 send did not strip newlines, or if nothing else, there could be an option to
not strip newlines.

This is the side-effect of code that handles removing comments from the cover letter. E.g. consider the following contents:

This is the cover letter introduction 
paragraph

# Removed because this person is a secret agent
# Removed-trailer: Some Person <some.person@example.com>

Signed-off-by: My Self <...>

When we remove the comments, we end up with a double newline, that was most likely not intentional. So, we collapse all repeated newlines into a single one. I'll think about how we can recognize intentional double newlines, but it's not a simple change.