| B4(5) | File Formats Manual | B4(5) |
B4 - Work with code submissions in a public-inbox archive
b4 {mbox,am,shazam,pr,diff,ty,kr,prep,send,trailers} [options]
This is a helper utility to work with patches and pull requests made available via a public-inbox archive like lore.kernel.org. It's written to make it simpler to participate in patch-based workflows, like those used in the Linux kernel development.
The name "b4" was chosen for ease of typing and because B-4 was the precursor to Lore and Data in the Star Trek universe.
Full documentation is available on https://b4.docs.kernel.org/.
Maintainer-oriented:
Contributor-oriented:
For full options and what they do, please see b4 --help and b4 subcommand --help.
This command allows retrieving entire threads from a remote public-inbox instance. You can open the resulting mbox file with most mail clients for actions like replying to conversations or reviewing patch submissions.
You can provide the message either as a msgid, as full URL to a public-inbox archive, or you can pipe it on stdin.
For options and their descriptions, see b4 mbox --help.
Examples
This command allows retrieving threads from a public-inbox instance and preparing them for applying to a git repository using the "git am" command. It will automatically perform the following operations:
Note: Unless you intend to do some preparatory work on the series before applying it to the git repository (e.g. a 3-way merge), you should consider using b4 shazam to apply the retrieved series.
For options and their descriptions, see b4 am --help.
Examples
This is very similar to b4 am, but will also apply patches directly to the current git tree using git am. Alternatively, when used with -H, it can fetch the patch series into FETCH_HEAD as if it were a pull request, ready to review and merge. B4 uses the cover letter as a template for the merge commit.
If you want to automatically invoke git-merge, you can use -M instead of -H. B4 automatically opens up the editor allowing you to edit the merge commit message.
Note: the -M and -H options work best for series that have the base-commit info matching an object in your local tree.
For options and their descriptions, see b4 shazam --help.
Examples
This command is for working with pull requests submitted using git-request-pull. It provides the following benefits as opposed to using git directly:
For options and their descriptions, see b4 pr --help.
Examples
If you've retrieved and applied some patches to your tree, you should be able to fire up the “auto-thankanator”, which uses patch-id and commit subject tracking to figure out which series from those you have retrieved you already applied to your tree. The process is usually pretty fast and fairly accurate.
To send mails directly using -S, you should have a configured [sendemail] section somewhere in your applicable git configuration files. By default, b4 ty writes out .thanks files in the current directly that you can edit and sent out using a command like mutt -f thanks.file.
For options and their descriptions, see b4 ty --help.
Examples
The diff subcommand allows comparing two different revisions of the same patch series using git range-diff. Note, that in order to perform the range-diff comparison, both revisions need to cleanly apply to the current tree, which may not always be possible to achieve.
For options and their descriptions, see b4 diff --help.
Examples
This subcommand allows maintaining a local keyring of contributor keys.
Note: this part of b4 is under active development with improvements planned for the near future.
For options and their descriptions, see b4 kr --help.
Examples
These commands allow preparing and submitting a patch series for review on the mailing list. Full documentation is available online at the following address:
https://b4.docs.kernel.org/en/latest/contributor/overview.html
For options, see the output of b4 prep --help, b4 trailers --help and b4 send --help.
Examples
B4 configuration is handled via git-config(1), so you can store it in either the toplevel $HOME/.gitconfig file, or in a per-repository .git/config file if your workflow changes per project.
To see configuration options available, see online documentation at https://b4.docs.kernel.org/en/latest/config.html
Commands making remote HTTP requests may be configured to use a proxy by setting the HTTPS_PROXY environment variable, as described in https://docs.python-requests.org/en/latest/user/advanced/#proxies.
Please email tools@kernel.org with support requests, or browse the list archive at https://lore.kernel.org/tools.
mricon@kernel.org
License: GPLv2+
The Linux Foundation and contributors
| 2024-06-14 | 0.14.2 |