]> git.ipfire.org Git - thirdparty/git.git/commit
b4: introduce configuration for the Git project
authorPatrick Steinhardt <ps@pks.im>
Wed, 3 Jun 2026 06:59:01 +0000 (08:59 +0200)
committerJunio C Hamano <gitster@pobox.com>
Wed, 3 Jun 2026 07:39:02 +0000 (16:39 +0900)
commit4dfc8412cf7009060795bc3ff8466970b2ec75c5
treeb9a26d66b54e1c6f3be20a3d463410365c6c83cb
parentcd81721e026cae31a1cc2cda9de7bac10a768176
b4: introduce configuration for the Git project

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>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
.b4-config [new file with mode: 0644]
.b4-cover-template [new file with mode: 0644]