mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-11-21 04:46:29 +03:00
If a linked worktree's directory is deleted and another worktree is moved to the same path, `git worktree list` reports both worktrees with that path. lazygit then crashes at startup with a stack overflow, and the terminal is left in a broken state. To tell the paths in a group apart, getUniqueNamesFromPathsAux keeps looking at one more parent directory, but identical paths never come apart, so it recurses forever. A stack overflow is a fatal error rather than a panic. No deferred function runs, so the terminal is not restored either. Name identical paths like a single path instead of recursing. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>