jesseduffield.lazygit/pkg/integration/tests/worktree
Stefan Haller 768d9f1a3f Rework the worktrees-panel 'n' into a branch picker
The old 'n' flow opened a "normal vs detached" menu (the same meaningless
gate the 'w' flow used to have), then asked for a base ref, a path typed from
scratch, and a branch name in three separate prompts.

Replace it with a single picker prompt titled "New worktree for branch",
suggesting local branches not already checked out anywhere, plus remote
branches that don't yet have a local branch of the same name. The entered
value is classified on confirm: an existing local branch checks out into a
new worktree, a remote branch creates a new local tracking branch, and
anything else creates a new branch off the current ref. All three then feed
the same location menu the 'w' flow uses, so paths are chosen from candidates
rather than typed blind. Picking a remote or new branch needs no separate
name prompt — the picker value already is the name. Checked-out branches are
filtered from the suggestions, and a verbatim type-in of one is rejected with
an error.

createWorktree now takes the context to switch focus to once the worktree is
created, so 'n' lands back in the worktrees panel while 'w' still lands in
the branches panel.

This deletes the old NewWorktree / NewWorktreeCheckout core and the now-
orphaned i18n (CreateWorktreeFrom, CreateWorktreeFromDetached, NewWorktreeBase,
NewBranchNameLeaveBlank), completing the migration started for 'w'.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-03 18:53:05 +02:00
..
add_for_existing_branch.go Redesign the 'w' worktree-creation flow 2026-07-03 18:53:05 +02:00
add_from_branch.go Redesign the 'w' worktree-creation flow 2026-07-03 18:53:05 +02:00
add_from_branch_detached.go Redesign the 'w' worktree-creation flow 2026-07-03 18:53:05 +02:00
add_from_commit.go Redesign the 'w' worktree-creation flow 2026-07-03 18:53:05 +02:00
add_from_remote_branch.go Redesign the 'w' worktree-creation flow 2026-07-03 18:53:05 +02:00
add_from_stash.go Redesign the 'w' worktree-creation flow 2026-07-03 18:53:05 +02:00
add_from_tag.go Redesign the 'w' worktree-creation flow 2026-07-03 18:53:05 +02:00
associate_branch_bisect.go Show worktree name next to branch in branches list 2026-03-09 11:34:34 +01:00
associate_branch_rebase.go Show worktree name next to branch in branches list 2026-03-09 11:34:34 +01:00
bare_repo.go Set working directory in lazygit test command 2024-01-12 19:59:31 +11:00
bare_repo_worktree_config.go Fix typos 2025-01-03 10:50:36 +11:00
crud.go Rework the worktrees-panel 'n' into a branch picker 2026-07-03 18:53:05 +02:00
custom_command.go Convert custom command Key fields to Keybinding 2026-05-25 15:32:47 +02:00
detach_worktree_from_branch.go Show worktree name next to branch in branches list 2026-03-09 11:34:34 +01:00
dotfile_bare_repo.go Set working directory in lazygit test command 2024-01-12 19:59:31 +11:00
double_nested_linked_submodule.go Use getters for AppState and UserConfig instead of accessing the fields directly 2024-08-18 10:24:52 +02:00
exclude_file_in_worktree.go Show branch name and detached HEAD in worktrees tab 2026-03-08 12:51:46 +01:00
fast_forward_worktree_branch.go Show worktree name next to branch in branches list 2026-03-09 11:34:34 +01:00
fast_forward_worktree_branch_should_not_pollute_current_worktree.go Show worktree name next to branch in branches list 2026-03-09 11:34:34 +01:00
force_remove_worktree.go Show branch name and detached HEAD in worktrees tab 2026-03-08 12:51:46 +01:00
force_remove_worktree_with_submodules.go Show branch name and detached HEAD in worktrees tab 2026-03-08 12:51:46 +01:00
location_candidates.go Redesign the 'w' worktree-creation flow 2026-07-03 18:53:05 +02:00
new_worktree_picker.go Rework the worktrees-panel 'n' into a branch picker 2026-07-03 18:53:05 +02:00
new_worktree_picker_remote.go Rework the worktrees-panel 'n' into a branch picker 2026-07-03 18:53:05 +02:00
remove_worktree_from_branch.go Show worktree name next to branch in branches list 2026-03-09 11:34:34 +01:00
reset_window_tabs.go Show branch name and detached HEAD in worktrees tab 2026-03-08 12:51:46 +01:00
symlink_into_repo_subdir.go Use getters for AppState and UserConfig instead of accessing the fields directly 2024-08-18 10:24:52 +02:00
worktree_in_repo.go Rework the worktrees-panel 'n' into a branch picker 2026-07-03 18:53:05 +02:00