mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-09-10 15:46:26 -04:00
Allow filtering worktrees by branch name in Worktrees pane
Co-authored-by: phanirithvij <phanirithvij2000@gmail.com>
This commit is contained in:
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"),
|
||||
)
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in a new issue