summaryrefslogtreecommitdiffstats
path: root/pkg/gui/presentation
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2023-07-16 19:39:53 +1000
committerJesse Duffield <jessedduffield@gmail.com>2023-07-30 18:35:22 +1000
commit18ea68c23a93d3a9a8270290e8f5e1df5e955892 (patch)
treebd299737014be696f67a6c5c726e476bd95098d6 /pkg/gui/presentation
parent4b2622d93be8d2daa0a4fbf6fe2f765414d9d72c (diff)
Support creating worktrees from refs
Diffstat (limited to 'pkg/gui/presentation')
-rw-r--r--pkg/gui/presentation/worktrees.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/pkg/gui/presentation/worktrees.go b/pkg/gui/presentation/worktrees.go
index 1161afc44..4676a2847 100644
--- a/pkg/gui/presentation/worktrees.go
+++ b/pkg/gui/presentation/worktrees.go
@@ -8,11 +8,11 @@ import (
"github.com/samber/lo"
)
-func GetWorktreeDisplayStrings(worktrees []*models.Worktree, isCurrent func(*models.Worktree) bool, isMissing func(*models.Worktree) bool) [][]string {
+func GetWorktreeDisplayStrings(worktrees []*models.Worktree, isCurrent func(string) bool, isMissing func(string) bool) [][]string {
return lo.Map(worktrees, func(worktree *models.Worktree, _ int) []string {
return GetWorktreeDisplayString(
- isCurrent(worktree),
- isMissing(worktree),
+ isCurrent(worktree.Path),
+ isMissing(worktree.Path),
worktree)
})
}