git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v2 3/3] b4: introduce configuration for the Git project

From
Patrick Steinhardt <ps@pks.im>
Date
Jun 3, 2026, 06:59 UTC
Message-ID
<20260603-pks-b4-v2-3-a8aea0aa2c23@pks.im>
In-Reply-To
<20260603-pks-b4-v2-0-a8aea0aa2c23@pks.im>

We're about to extend our documentation to recommend b4 for sending patch series to the mailing list. Prepare for this by introducing a b4 configuration so that the tool knows to honor our preferences. For now, this configuration does two things:

  - It configures "send-same-thread = shallow", which tells b4 to always
    send subsequent versions of the same patch series as a reply to the
    cover letter of the first version.
  - It configures "prep-cover-template", which tells b4 to use a custom
    template for the cover letter. The most important change compared to
    the default template is that our custom template also includes a
    range-diff.

There's potentially more things that we may want to configure going forward, like for example auto-configuration of folks to Cc on certain patches. But these two tweaks feel like a good place to start.

Note that these values only serve as defaults, and users may want to tweak those defaults based on their own preference. Luckily, users can do that without having to touch `.b4-config` at all, as b4 allows them to override values via Git configuration:

    ```
    $ git config set b4.prep-cover-template /does/not/exist
    $ b4 send --dry-run
    ERROR: prep-cover-template says to use x, but it does not exist
    ```

So this gives users an easy way to override our defaults without having to touch ".b4-config", which would dirty the tree.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
---
 .b4-config         |  6 ++++++
 .b4-cover-template | 11 +++++++++++
 2 files changed, 17 insertions(+)
diff --git a/.b4-config b/.b4-config
new file mode 100644
index 0000000000..fd4fb56b6d
--- /dev/null
+++ b/.b4-config
@@ -0,0 +1,6 @@
+# Note that these are default values that you can tweak via the typical
+# git-config(1) machinery. You thus shouldn't ever have to change this file.
+# See also https://b4.docs.kernel.org/en/latest/config.html.
+[b4]
+send-same-thread = shallow
+prep-cover-template = ./.b4-cover-template
diff --git a/.b4-cover-template b/.b4-cover-template
new file mode 100644
index 0000000000..ab864933b5
--- /dev/null
+++ b/.b4-cover-template
@@ -0,0 +1,11 @@
+${cover}
+
+---
+${shortlog}
+
+${diffstat}
+
+${range_diff}
+---
+base-commit: ${base_commit}
+${prerequisites}
-- 
2.54.0.1064.gd145956f57.dirty
Previous: Patrick SteinhardtNext: Toon Claes
Message 36 of 54 in “Documentation: recommend the use of b4”
  1. 0/2 Documentation: recommend the use of b4Patrick Steinhardt, Jun 2, 2026
  2. 1/2 b4: introduce configuration for the Git projectPatrick Steinhardt, Jun 2, 2026
  3. Junio C HamanoJun 2, 2026
  4. Patrick SteinhardtJun 2, 2026
  5. Ramsay JonesJun 2, 2026
  6. Junio C HamanoJun 3, 2026
  7. Patrick SteinhardtJun 3, 2026
  8. Tuomas AholaJun 2, 2026
  9. Weijie YuanJun 3, 2026
  10. Patrick SteinhardtJun 3, 2026
  11. Weijie YuanJun 3, 2026
  12. Weijie YuanJun 3, 2026
  13. SZEDER GáborJun 3, 2026
  14. Weijie YuanJun 3, 2026
  15. Tuomas AholaJun 3, 2026
  16. Junio C HamanoJun 4, 2026
  17. Patrick SteinhardtJun 8, 2026
  18. Patrick SteinhardtJun 8, 2026
  19. 2/2 Documentation/MyFirstContribution: recommend the use of b4Patrick Steinhardt, Jun 2, 2026
  20. Weijie YuanJun 2, 2026
  21. Patrick SteinhardtJun 3, 2026
  22. Weijie YuanJun 3, 2026
  23. Weijie YuanJun 3, 2026
  24. 0/3 Documentation: recommend the use of b4Patrick Steinhardt, Jun 3, 2026
  25. 1/3 Documentation/MyFirstContribution: recommend shallow threadingPatrick Steinhardt, Jun 3, 2026
  26. Tuomas AholaJun 3, 2026
  27. Patrick SteinhardtJun 8, 2026
  28. Weijie YuanJun 3, 2026
  29. Patrick SteinhardtJun 8, 2026
  30. Weijie YuanJun 8, 2026
  31. Kristoffer HaugsbakkJun 3, 2026
  32. Patrick SteinhardtJun 8, 2026
  33. 2/3 Documentation/MyFirstContribution: recommend the use of b4Patrick Steinhardt, Jun 3, 2026
  34. Toon ClaesJun 4, 2026
  35. Patrick SteinhardtJun 8, 2026
  36. 3/3 b4: introduce configuration for the Git projectPatrick Steinhardt, Jun 3, 2026
  37. Toon ClaesJun 3, 2026
  38. Patrick SteinhardtJun 8, 2026
  39. 0/3 Documentation: recommend the use of b4Patrick Steinhardt, Jun 8, 2026
  40. 1/3 MyFirstContribution: recommend shallow threading of cover lettersPatrick Steinhardt, Jun 8, 2026
  41. Karthik NayakJun 10, 2026
  42. Patrick SteinhardtJun 15, 2026
  43. 2/3 MyFirstContribution: recommend the use of b4Patrick Steinhardt, Jun 8, 2026
  44. 3/3 b4: introduce configuration for the Git projectPatrick Steinhardt, Jun 8, 2026
  45. Karthik NayakJun 10, 2026
  46. Patrick SteinhardtJun 15, 2026
  47. Toon ClaesJun 9, 2026
  48. Junio C HamanoJun 9, 2026
  49. Patrick SteinhardtJun 10, 2026
  50. 0/3 Documentation: recommend the use of b4Patrick Steinhardt, Jun 15, 2026
  51. 1/3 MyFirstContribution: recommend shallow threading of cover lettersPatrick Steinhardt, Jun 15, 2026
  52. 2/3 MyFirstContribution: recommend the use of b4Patrick Steinhardt, Jun 15, 2026
  53. 3/3 b4: introduce configuration for the Git projectPatrick Steinhardt, Jun 15, 2026
  54. Toon ClaesJun 16, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.