Release notes

Unreleased

Native history rewriting (replaces git-filter-repo)

b4 no longer depends on git-filter-repo for the two operations that rewrite commit history on a prep branch (cover-letter updates and trailer application via b4 trailers -u). The rewrite is now implemented natively using pygit2, which b4 already pulls in through the ezgb dependency. Existing safety backups continue to live at refs/original/<branch>.

The migration also fixes a long-standing issue where git notes attached to rewritten commits were silently orphaned on the old commit OIDs (upstream git-filter-repo issue #22). b4 now migrates entries under any refs/notes/* ref onto the new commit OIDs after a rewrite, preserving note message bytes verbatim.

GPG signatures on rewritten commits continue to be stripped, as they were previously with git-filter-repo. Re-sign from refs/original/<branch> if needed — for example:

git rebase --exec 'git commit --amend -S --no-edit' \
    refs/original/<branch>

v0.15

b4 review — TUI-based patch review workflow (technology preview)

This release introduces b4 review, a new terminal-based workflow for maintainers who receive, review, and accept patches from mailing lists. It ships as a technology preview (alpha): the commands, keybindings, configuration options, and on-disk formats may change in incompatible ways between releases. Bug reports and feedback are welcome at tools@kernel.org.

Note

The TUI requires the optional tui dependency group. Install with pipx install b4[tui] or uv tool install b4[tui].

The workflow is built around a lightweight SQLite tracking database and per-series review branches. It comprises three cooperating TUI apps:

Tracking TUI (b4 review tui)

Browse and manage tracked series with status indicators, take (apply) series using merge, linear, or cherry-pick strategies, compare revisions with range-diff, send thank-you messages, and archive completed series. The app groups series by lifecycle state (active, new, waiting, gone) and sorts by most-recent activity.

Review TUI (b4 review <branch>)

Split-pane interface with a patch list and scrollable diff viewer. Add inline comments and code-review trailers, preview outgoing emails, invoke an external AI agent for automated review assistance, and send review replies — all without leaving the terminal.

Patchwork TUI (b4 review pw)

Browse outstanding series from a Patchwork server, set state and archived flags, and track series into the local database for review.

Highlights:

  • Series tracking and lifecycle management — track series from the CLI (b4 review track <msgid>), from your mail client, or from Patchwork. Series progress through new → reviewing → replied → accepted → thanked states.

  • Revision discovery and upgrades — b4 automatically discovers older and newer revisions of a tracked series using change-id and in-reply-to chains. Upgrading to a newer revision preserves your review state and prior context.

  • Inline commenting — press r in the review view to open $EDITOR with the full diff quoted. Write your comments below the relevant lines and b4 will format them as proper email replies. The diff view shows community follow-up comments from the mailing list alongside your own.

  • AI agent integration — optionally invoke an external AI agent (Claude Code, Gemini CLI, OpenAI Codex CLI, or GitHub Copilot CLI) to produce a first-pass review. Agent findings remain private to you; you decide what, if anything, to include in your reply.

  • Per-patch state machine — mark individual patches as done (✓), skip (✕), or draft (✎) to track your progress through large series. B4 automatically excludes skipped patches from cherry-pick selection and outgoing emails.

  • Three take strategies — merge (creates a merge commit from the cover letter), linear (git am), or cherry-pick (select individual patches). B4 adds per-commit Signed-off-by and Link trailers on request.

  • Snooze — defer a series until a specific date, duration, or git tag. B4 skips snoozed series during bulk updates and automatically wakes them when the snooze expires.

  • Cross-machine synchronisation — push b4/review/* branches to a private remote and rescan on another machine to rebuild the tracking database from branch metadata.

  • Mutt-style thread viewer — press e to browse the full email thread with tree art, attestation status display, and reply support. B4 tracks per-message flags (seen, flagged, answered) across sessions.

  • Worktree support — enrolled repositories work correctly from worktrees; a configurable review-target-branch sets the default branch for take operations.

  • Patchwork state synchronisation — when you have write access to a Patchwork instance, b4 automatically updates the remote series state as you progress through the review lifecycle.

  • Prior review context — when upgrading to a new revision, b4 carries forward your previous review comments and notes so you can see what you said last time.

  • Quick-reply — reply to follow-up messages directly from the review TUI or thread viewer without switching to your email client.

See Getting started with b4 review for a walkthrough with screencasts, and review: TUI-based patch review workflow (alpha) for the full reference.

b4 dig — trace applied commits back to mailing list submissions

The new b4 dig command searches for the original mailing list submission of a commit that has already been applied to a git tree. It matches by patch-id, author, and subject to locate the original thread on lore.kernel.org.

b4 dig -c <commitish>
b4 dig -c <commitish> --all-series
b4 dig -c <commitish> --who
b4 dig -c <commitish> --save-mbox /tmp/thread.mbx

The --all-series flag shows all revisions of the series containing the commit. The --who flag shows who was originally included on the thread (To/Cc recipients), and --save-mbox saves the matched thread to a local mbox file. See dig: finding commit origins for details.

b4 shazam — three-way merge and conflict resolution

b4 shazam -H now performs a three-way merge when applying patches, which significantly improves the success rate for series that do not apply cleanly with a simple git am. When conflicts do occur, the new --resolve flag drops you into an interactive conflict resolution session instead of aborting:

b4 shazam -H --resolve <msgid>

b4 prep — pre/post history-rewrite hooks

Two new configuration keys let you run commands before and after b4 rewrites history on a prep branch (for example, when updating the cover letter or applying trailers):

b4.prep-pre-rewrite-hook

Command to run before the rewrite. A non-zero exit aborts the operation, which is useful for tools like StGit that need to commit their internal state first.

b4.prep-post-rewrite-hook

Command to run after a successful rewrite. A non-zero exit logs a warning but does not undo the rewrite.

Example for StGit users:

[b4]
    prep-pre-rewrite-hook = stg commit --all
    prep-post-rewrite-hook = stg repair

Other notable changes

New features and enhancements:

  • XOAUTH2 and bearer-token SMTP authentication — b4 can now use XOAUTH2 or bearer tokens to authenticate to SMTP servers, for environments that do not support basic authentication.

  • Presubject support — set b4.send-presubject or use --set-presubject to add a prefix before the standard [PATCH] subject tag.

  • Send-email aliases — b4 now reads sendemail.aliasesfile and sendemail.aliasfiletype to expand aliases in To/Cc fields, the same way git send-email does.

  • Codespell integrationb4 prep --check now runs codespell as a spellcheck pass when the codespell tool is installed.

  • Shallow same-thread supportb4.send-same-thread = shallow sends follow-up versions as a reply to the cover letter of the previous version rather than the entire thread.

  • Force cover letter for single-patch series — use b4 send --force-cover-letter to generate a separate cover letter even when the series has only one patch.

  • Default Link domain — the default linkmask now uses patch.msgid.link instead of lore.kernel.org.

  • Full-index binary diffs — b4 now creates patches with --full-index --binary for more reliable application.

  • Clean multiple prep branchesb4 prep --cleanup now accepts multiple branch names at once.

  • Thank-you self-copyb4 ty --me-too sends a copy of the thank-you message to yourself.

  • Range-diff argumentsb4 prep --compare-to and b4 diff now accept --range-diff-opts to pass additional flags to git range-diff.

  • Trailer provenanceb4 trailers now shows the message-id and source of each trailer it discovers.

  • Pre-flight check improvements — check output now includes the exit code and stderr from check commands for easier debugging.

Thanks

Thanks to the following people for reporting bugs, suggesting features, reviewing patches, testing, and contributing code:

  • Alexey Minnekhanov

  • Andrew Cooper

  • Andy Shevchenko

  • Christian Heusel

  • Conor Dooley

  • Dave Marquardt

  • Geert Uytterhoeven

  • Jonathan Corbet

  • Junio C Hamano

  • Juri Lelli

  • Kevin Hilman

  • Krzysztof Kozlowski

  • Lee Jones

  • Linus Torvalds

  • Louis Chauvet

  • Luca Ceresoli

  • Manos Pitsidianakis

  • Marc Kleine-Budde

  • Mark Brown

  • Matthieu Baerts

  • Maxime Ripard

  • Michael S. Tsirkin

  • Miguel Ojeda

  • Nathan Chancellor

  • Panagiotis Vasilopoulos

  • Ricardo Ribalda

  • Rob Herring

  • Tamir Duberstein

  • Toke Høiland-Jørgensen