# git: Add SSH support for removing and renaming git worktrees \(\#50759\) · gitcafe/zed

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

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

Visibility: public

Requested revision: d18e4a75bc8892090912bc536c081e3e84df1d2a

Requested commit: d18e4a75bc8892090912bc536c081e3e84df1d2a

Commit: d18e4a75bc8892090912bc536c081e3e84df1d2a

Tree: cfc0dd760b0670fe78d387cbe627bfc7a13f1a76

Author: Anthony Eid

Committer: GitHub

## Message

```
git: Add SSH support for removing and renaming git worktrees  (#50759)

This should be the last step in implementing full git worktree support
in the `GitStore`. We still need to add UI for that allows a user to
rename a git worktree and, by extension git branches if we use the git
picker to do so.

Also, I added a helper function called `disallow_guest_request::<T>` to
the `Collab::rpc` that is used to specify a proto request isn't allowed
to be sent by a guest. This enabled me to add a regression test that
checks that a guest isn't allowed to delete a git worktree, without the
test hanging forever because it's waiting for the proto server to
respond.

Since SSH connections send the proto message directly from client to
remote host, this won't affect those requests.

Before you mark this PR as ready for review, make sure that you have:
- [x] Added solid test coverage and/or screenshots from doing manual
testing
- [x] Done a self-review taking into account security and performance
aspects
- [ ] Aligned any UI changes with the [UI
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)

Release Notes:

- git: Add SSH support for removing git worktrees
```

## Parents

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

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