class Git::Worktrees

Collection of all Git worktrees in a repository

Wraps every linked and main worktree and provides enumeration and path-based lookup.

@example Enumerate all worktrees

worktrees = repo.worktrees
worktrees.each { |wt| puts wt.dir }

@deprecated Use {Git::Repository::WorktreeOperations#worktree_list} instead

{Git::Repository::WorktreeOperations#worktree_list} returns
`Array<Git::WorktreeInfo>` (immutable value objects). Look a worktree up
by path with `worktree_list.find { |w| w.path == path }` in place of
{#[]}, and call {Git::Repository::WorktreeOperations#worktree_prune} in
place of {#prune}. Constructing a `Git::Worktrees` emits a deprecation
warning.

@api public