Add test for opening lazygit in the worktree of a bare repo

This commit is contained in:
Jesse Duffield 2023-07-27 21:52:24 +10:00
parent e874f94cf8
commit 2b24c15938
5 changed files with 109 additions and 28 deletions

View file

@ -46,6 +46,11 @@ func (self *WorktreeLoader) GetWorktrees() ([]*models.Worktree, error) {
current = nil
continue
}
if splitLine == "bare" {
current = nil
continue
}
if strings.HasPrefix(splitLine, "worktree ") {
path := strings.SplitN(splitLine, " ", 2)[1]
isMain := path == currentRepoPath