mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-09-10 07:36:27 -04:00
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> |
||
|---|---|---|
| .. | ||
| translations | ||
| english.go | ||
| i18n.go | ||
| i18n_test.go | ||