1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-30 03:23:08 +03:00

Support creating worktrees from refs

This commit is contained in:
Jesse Duffield
2023-07-16 19:39:53 +10:00
parent 4b2622d93b
commit 18ea68c23a
9 changed files with 239 additions and 29 deletions

View File

@ -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)
})
}