Skip to contentSkip to conversation

Allow sending prefixes before [PATCH]

b4 Erik Schilling 3 participants 9 messages Jun 30, 2023 – Nov 28, 2025

lore
Share & tools
lore
#0 lore raw

libgpiod wants patches to be sent as [libgpiod][PATCH ...] [1]. However, b4 always sends [PATCH libgpiod ...]. I found no config switch to change that.

Maybe one could differ between prefixes and tags? Then prefixes could be a _real_ prefix and a tag could be within the square brackets as described by the docs [2]?

[1] https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git/tree/README?id=4510231c95a087f58a155cf74164e403e1e0584f#n282
[2] https://docs.kernel.org/process/submitting-patches.html#the-canonical-patch-format

Regards,
- Erik

#1 lore raw
Quoted 3 lines · Erik Schilling

libgpiod wants patches to be sent as [libgpiod][PATCH ...] [1]. However, b4 always sends [PATCH libgpiod ...]. I found no config switch to change that.

Because it's wrong[tm]. :)

Quoted 3 lines

Maybe one could differ between prefixes and tags? Then prefixes could be a _real_ prefix and a tag could be within the square brackets as described by the docs [2]?

I'll think about adding a way to do this.

-K

#2 lore raw
In reply to Erik Schilling
Quoted 3 lines · Erik Schilling

libgpiod wants patches to be sent as [libgpiod][PATCH ...] [1]. However, b4 always sends [PATCH libgpiod ...]. I found no config switch to change that.

bugbot assign to me

-K

#5 lore raw
In reply to Erik Schilling

Louis Rannou writes via Kernel.org Bugzilla:

The issue in patching the --set-prefixes command is that when it comes to make the cover, the LoreSubject class is parsing all the [foo] in its title, considers them as standard prefixes and moves them into the PATCH bracket.

View: https://bugzilla.kernel.org/show_bug.cgi?id=217642#c4
You can reply to this message to join the discussion.

Signature · 2 lines
Deet-doot-dot, I am a bot.
Kernel.org Bugzilla (bugspray 0.1-dev)
#6 lore raw
In reply to Erik Schilling

Louis Rannou writes via Kernel.org Bugzilla:

I suggested a new patch which includes Antonin's with a second patch to cover the sendreceive part.

I think this is the best solution, though there might also need a --postsubject to set some [] prefixes after the [PATCH ...]

However, it would be very nice to have this merged as it's block the usage of b4 on several projects (almost any yocto sublayers in my case).

https://lore.kernel.org/all/[email protected]/

Unfortunately I have no solution to test that myself

View: https://bugzilla.kernel.org/show_bug.cgi?id=217642#c5
You can reply to this message to join the discussion.

Signature · 2 lines
Deet-doot-dot, I am a bot.
Kernel.org Bugzilla (bugspray 0.1-dev)
#7 lore raw
In reply to Erik Schilling

Antonin Godard writes in commit d7232f5db2e4379bd9372b00707a78ec8d36b44a:

Add support for setting a presubject

Some mailing lists require a prefix to come before the [PATCH] in the subject of emails, such as OpenEmbedded or libgpiod. The current prefix mechanism does not allow for that (only after PATCH), and setting the format.subjectPrefix Git option does not work either.

Add a new configuration option send-presubject as well as a --set-presubject argument to be able to include anything that should come before the subject. The logic behind prefixes is not changed and this new option does not break any existing prefix assignments.

In order not to break the logic in LoreSubject's __init__ function, which parses the subject line and strips brackets in order to reorganize the subject line later, the presubject must be enclosed with brackets too (_check_presubject() is used to ensure that).

(via https://git.kernel.org/pub/scm/utils/b4/b4.git/commit/?id=d7232f5db2e4)

Signature · 2 lines
Deet-doot-dot, I am a bot.
Kernel.org Bugzilla (bugspray 0.1-dev)
#8 lore raw
In reply to Erik Schilling

Louis Rannou writes via Kernel.org Bugzilla:

Please note that the issue won't be fixed unless the server side is updateded. So far, this raises an error:

Error from endpoint: This service only accepts patches

(tried with lkml.kernel.org/_b4_submit)

View: https://bugzilla.kernel.org/show_bug.cgi?id=217642#c7
You can reply to this message to join the discussion.

Signature · 2 lines
Deet-doot-dot, I am a bot.
Kernel.org Bugzilla (bugspray 0.1-dev)