mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-12 04:45:47 +02:00
Add test for opening lazygit in the worktree of a bare repo
This commit is contained in:
parent
e874f94cf8
commit
2b24c15938
5 changed files with 109 additions and 28 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue