# Refactor: Make it possible to share a remote worktree \(\#12775\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/e174f16d506365173fbb1a201ce834f25d980249)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: e174f16d506365173fbb1a201ce834f25d980249

Requested commit: e174f16d506365173fbb1a201ce834f25d980249

Commit: e174f16d506365173fbb1a201ce834f25d980249

Tree: 3949827c992fa37341a184768c73e00f1212d3be

Author: Max Brunsfeld

Committer: GitHub

## Message

```
Refactor: Make it possible to share a remote worktree (#12775)

This PR is an internal refactor in preparation for remote editing. It
restructures the public interface of `Worktree`, reducing the number of
call sites that assume that a worktree is local or remote.

* The Project no longer calls `worktree.as_local_mut().unwrap()` in code
paths related to basic file operations
* Fewer code paths in the app rely on the worktree's `LocalSnapshot`
* Worktree-related RPC message handling is more fully encapsulated by
the `Worktree` type.

to do:
* [x] file manipulation operations
* [x] sending worktree updates when sharing

for later
* opening buffers
* updating open buffers upon worktree changes

Release Notes:

- N/A
```

## Parents

- [aa60fc2f191aa82547cf24ee40a340071910cef1](https://git.cafe/gitcafe/zed/commit/aa60fc2f191aa82547cf24ee40a340071910cef1?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/e174f16d506365173fbb1a201ce834f25d980249?format=markdown)
