mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-08-29 18:24:21 -05:00
Allow filtering worktrees by branch name in Worktrees pane
Co-authored-by: phanirithvij <phanirithvij2000@gmail.com>
This commit is contained in:
co-authored by
phanirithvij
parent
c3027caf6b
commit
530d773052
@@ -17,7 +17,7 @@ func NewWorktreesContext(c *ContextCommon) *WorktreesContext {
|
||||
viewModel := NewFilteredListViewModel(
|
||||
func() []*models.Worktree { return c.Model().Worktrees },
|
||||
func(worktree *models.Worktree) []string {
|
||||
return []string{worktree.Name}
|
||||
return []string{worktree.Name, worktree.Branch}
|
||||
},
|
||||
)
|
||||
|
||||
|
||||
@@ -28,6 +28,7 @@ var FilterWorktrees = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
).
|
||||
FilterOrSearch("xxx").
|
||||
Lines(
|
||||
Contains("worktree-1 branch-xxx"),
|
||||
Contains("worktree-xxx branch-aaa"),
|
||||
)
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user