I should have known; the test is affected by the bug Rubén is trying to fix in: https://lore.kernel.org/git/eeb0c778-af0a-235c-f009-bca3abafdb15@xxxxxxxxx/ Where the order that the worktrees are found is not deterministic and so the ignore_current_worktree flag to die_if_checked_out() might trigger incorrectly. Carlo