# Update project metadata when releasing a worktree's weak handle · gitcafe/zed

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

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

Visibility: public

Requested revision: 2f09a4af16637bb2970f583220cdcdd597605cad

Requested commit: 2f09a4af16637bb2970f583220cdcdd597605cad

Commit: 2f09a4af16637bb2970f583220cdcdd597605cad

Tree: f3d1e4cceabcda5e1e60e162d988597e1eb80645

Author: Antonio Scandurra

Committer: Antonio Scandurra

## Message

```
Update project metadata when releasing a worktree's weak handle

When a project was getting unshared, we would remove invisible worktrees
from the project's state without notifying the server, which was causing
the randomized tests to fail.

This commit calls `Project::remove_worktree` when a worktree's handle gets
released. Doing so ensures that we update both our local metadata database
as well as the state on the server.

```

## Parents

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

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