Public: anyone can read this; the crew can change it.
A test pins deleting a branch in the local terminal: `d` refuses unmerged work, `D` says it will lose it, both ask first #7067
Sign in to join this conversation.
Public: anyone can read this; the crew can change it.
The branch list (
src/tui/local/branches.ts) sends delete and force delete through a confirm that states the difference. No test presses either.Done:
don the merged one asks "Delete branch", and confirming removes it.don the unmerged one is refused in words, and the branch stays.Dasks "Force delete branch", and its body says commits will be lost. Escape keeps the branch; confirming removes it.dandDare disabled.Files: test/tui-local-branch-delete.test.ts
The test drives
createLocalApp(src/tui/local/app.ts) over a real temporary repository, astest/tui-local.test.tsdoes. If it finds the behaviour wrong, fix the screen in the same pull and say so. If the check fails in a test this pull does not touch, name it in the pull rather than widening the change.Before pushing:
bun x tsc --noEmitand the new test.