Linux maintainer tooling and workflows
 help / color / mirror / Atom feed
* [PATCH b4 0/6] Keep the user's git config out of b4's scratch worktrees
@ 2026-07-29 10:44 Christian Brauner
  2026-07-29 10:44 ` [PATCH b4 1/6] git_run_command: look past -c overrides for the subcommand Christian Brauner
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Christian Brauner @ 2026-07-29 10:44 UTC (permalink / raw)
  To: Kernel.org Tools; +Cc: Konstantin Ryabitsev, Christian Brauner (Amutable)

With submodule.recurse=true in the user's config b4 cannot apply
anything in a repo that carries submodules. The scratch worktree's
sparse checkout recurses, looks for the per-worktree submodule clones a
just-created worktree cannot have, and dies:

    fatal: not a git repository: ../../worktrees/b4-shazam-worktree/modules/ezgb
    fatal: could not reset submodule index

That takes review-branch creation, b4 shazam and the TUI's test applies
with it. The b4 repo itself is affected through its vendored
patatt/liblore/ezgb submodules.

Everything b4 does in those worktrees is thrown away when the call
returns, so they can run with overrides of their own: no submodule
recursion and no gpg signing. SCRATCH_GIT_OPTS carries both, since each
is inert where the other matters, and every scratch worktree switches
over to it: the shazam apply, the TUI's five hand-rolled test applies,
the fake-am staging worktree and the sent-tag worktree in b4 send. The
commits that outlive their worktree keep the user's signing config.

Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
---
Christian Brauner (6):
      git_run_command: look past -c overrides for the subcommand
      shazam: ignore the user's submodule.recurse in the scratch worktree
      review-tui: use the shared scratch-worktree overrides for test applies
      fake-am: use the scratch-worktree overrides in the staging worktree
      send: use the scratch-worktree overrides when tagging a sent series
      tests: exercise the scratch worktrees under submodule.recurse

 src/b4/__init__.py                 |  43 +++++++++--
 src/b4/ez.py                       |   8 +-
 src/b4/review_tui/_modals.py       |  44 +++++++----
 src/b4/review_tui/_tracking_app.py |  11 ++-
 src/tests/conftest.py              |  52 ++++++++++++-
 src/tests/test___init__.py         |  15 ++++
 src/tests/test_ez.py               |  45 +++++++++++-
 src/tests/test_tui_tracking.py     | 146 ++++++++++++++++++++++++++++++++++++-
 8 files changed, 332 insertions(+), 32 deletions(-)
---
base-commit: 99fe195c0aa5a88be5033f87cad22bc32d27cbfe
change-id: 20260729-work-b4-scratch-worktrees-f69cde824a95


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2026-07-31  5:08 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-29 10:44 [PATCH b4 0/6] Keep the user's git config out of b4's scratch worktrees Christian Brauner
2026-07-29 10:44 ` [PATCH b4 1/6] git_run_command: look past -c overrides for the subcommand Christian Brauner
2026-07-29 10:44 ` [PATCH b4 2/6] shazam: ignore the user's submodule.recurse in the scratch worktree Christian Brauner
2026-07-29 10:44 ` [PATCH b4 3/6] review-tui: use the shared scratch-worktree overrides for test applies Christian Brauner
2026-07-29 10:44 ` [PATCH b4 4/6] fake-am: use the scratch-worktree overrides in the staging worktree Christian Brauner
2026-07-29 10:44 ` [PATCH b4 5/6] send: use the scratch-worktree overrides when tagging a sent series Christian Brauner
2026-07-29 10:44 ` [PATCH b4 6/6] tests: exercise the scratch worktrees under submodule.recurse Christian Brauner
2026-07-31  5:08 ` [PATCH b4 0/6] Keep the user's git config out of b4's scratch worktrees Konstantin Ryabitsev

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox