Convert weak worktree handles into strong handles when sharing
Co-Authored-By: Max Brunsfeld <max@zed.dev>
This commit is contained in:
parent
4b0300daea
commit
07120d47f9
2 changed files with 38 additions and 9 deletions
|
@ -345,6 +345,10 @@ impl Worktree {
|
|||
matches!(self, Worktree::Local(_))
|
||||
}
|
||||
|
||||
pub fn is_remote(&self) -> bool {
|
||||
!self.is_local()
|
||||
}
|
||||
|
||||
pub fn snapshot(&self) -> Snapshot {
|
||||
match self {
|
||||
Worktree::Local(worktree) => worktree.snapshot().snapshot,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue