mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-09-10 15:46:26 -04:00
RepoPath() is meant to be the same as WorktreePath() when we're in the main worktree, but we derived it from the git dir's location instead. That is only the same thing when the git dir lives inside the work tree. With core.worktree, --work-tree, or a .git file pointing at a repo dir that isn't called .git, it lands on a directory that isn't a worktree at all, and the repo name we show follows it there. A worktree that has the repo's common git dir to itself is the main worktree, so use its path. That subsumes the submodule case, whose git dir lives under the superproject's .git/modules but is still the submodule's own common dir; --show-superproject-working-tree is now only needed for a linked worktree of a submodule. The existing bare repo test asserted a git output that can't occur (a work tree and --is-bare-repository=true at once), but the rest of it is the shape of a repo opened with --git-dir/--work-tree, where the new repo path is the correct one. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| app | ||
| cheatsheet | ||
| commands | ||
| common | ||
| config | ||
| constants | ||
| env | ||
| fakes | ||
| gocui | ||
| gui | ||
| i18n | ||
| integration | ||
| jsonschema | ||
| logs | ||
| snake | ||
| tasks | ||
| theme | ||
| updates | ||
| utils | ||