mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-09-10 07:36:27 -04:00
The old flow forced an up-front "normal vs detached" menu (meaningless for commits, tags and stashes), then asked the user to type a worktree path from scratch — easy to get wrong, and ambiguous about what relative paths resolve against. It also offered the same two actions everywhere regardless of what was selected. Replace it with per-context "Worktree" menus whose items imply the intent (new branch + worktree, worktree for an existing branch, detached worktree), each feeding a shared name -> location -> create pipeline. The location menu offers candidate parent directories as absolute paths instead of a blank field, and "Worktree for a branch" is disabled (with a reason) when that branch is already checked out somewhere, rather than failing after the fact. Each ref/commit panel binds 'w' in its own controller and calls the matching typed entry point on the worktree helper, so which menu opens is decided statically by the call site rather than by dispatching on a ref's dynamic type. The three commit panels share one menu through BasicCommitsController; there is no longer a shared worktree-options controller. The worktrees-panel 'n' flow and its old core (NewWorktree / NewWorktreeCheckout) are left untouched here so nothing is written and then rewritten; they migrate, and the dead i18n strings get removed, in a follow-up commit. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| Custom_Keybindings.md | ||
| Keybindings_en.md | ||
| Keybindings_ja.md | ||
| Keybindings_ko.md | ||
| Keybindings_nl.md | ||
| Keybindings_pl.md | ||
| Keybindings_pt.md | ||
| Keybindings_ru.md | ||
| Keybindings_zh-CN.md | ||
| Keybindings_zh-TW.md | ||