Update worktree model

This commit is contained in:
Jesse Duffield 2023-07-16 11:36:50 +10:00
parent 03f726038e
commit 7682ec029b
4 changed files with 18 additions and 20 deletions

View file

@ -44,8 +44,8 @@ func (self *WorktreeLoader) GetWorktrees() ([]*models.Worktree, error) {
if strings.HasPrefix(splitLine, "worktree ") {
path := strings.SplitN(splitLine, " ", 2)[1]
currentWorktree = &models.Worktree{
Id: len(worktrees),
Path: path,
IsMain: len(worktrees) == 0,
Path: path,
}
} else if strings.HasPrefix(splitLine, "branch ") {
branch := strings.SplitN(splitLine, " ", 2)[1]