[PATCH b4 0/2] review-tui: don't gpg-sign throwaway test-apply commits

Christian Brauner <[email protected]> Thu, 23 Jul 2026 10:33:34 +0200
Newsgroups org.kernel.linux.tools
Message-ID <[email protected]>
The take/rebase/target/base modals check whether a series applies
cleanly by running a real git-am into a temporary worktree and rebase
additionally probes with a cherry-pick. The four modal probes run from
worker threads while the TUI keeps the terminal.

With commit.gpgsign=true and pinentry-curses git tries to sign every
probe commit. pinentry then pops up on the tty that Textual owns in raw
mode. The TUI repaints over the PIN dialog and its input reader swallows
the keystrokes and so gpg never gets the PIN and the apply hangs. With a
card-backed key this reproduces on every take.

The probe commits are discarded together with the temporary worktree
so signing them is pure waste. Let's pass -c commit.gpgsign=false to all
five probes. The rebase cherry-pick runs under suspend() and so cannot
deadlock. But its commits are just as throwaway. Real applies (checkout,
take, rebase, merge) are unaffected. They run with the TUI suspended,
where pinentry works, and keep signing per the user's configuration.

Signed-off-by: Christian Brauner (Amutable) <[email protected]>
---
Christian Brauner (2):
      review-tui: don't gpg-sign throwaway test-apply commits
      tests: guard the test-apply probes against gpg signing

 src/b4/review_tui/_modals.py       |  20 +++++--
 src/b4/review_tui/_tracking_app.py |   7 ++-
 src/tests/test_tui_tracking.py     | 113 +++++++++++++++++++++++++++++++++++--
 3 files changed, 131 insertions(+), 9 deletions(-)
---
base-commit: 0e65f947e4f98a3c48a47f280a86dd23845259b0
change-id: 20260723-work-b4-testapply-nosign-ce55786e1b19