Remove list_worktrees
and use relative paths instead (#26546)
Release Notes: - N/A
This commit is contained in:
parent
6bf6fcaa51
commit
41eb586ec8
13 changed files with 150 additions and 132 deletions
|
@ -1589,6 +1589,11 @@ impl Project {
|
|||
self.worktree_store.read(cx).visible_worktrees(cx)
|
||||
}
|
||||
|
||||
pub fn worktree_for_root_name(&self, root_name: &str, cx: &App) -> Option<Entity<Worktree>> {
|
||||
self.visible_worktrees(cx)
|
||||
.find(|tree| tree.read(cx).root_name() == root_name)
|
||||
}
|
||||
|
||||
pub fn worktree_root_names<'a>(&'a self, cx: &'a App) -> impl Iterator<Item = &'a str> {
|
||||
self.visible_worktrees(cx)
|
||||
.map(|tree| tree.read(cx).root_name())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue