# agent: Clean up old remove worktree manage folder code \(\#54205\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 513ffaf4081be7d1c461cbae8d703a6542aa2032

Requested commit: 513ffaf4081be7d1c461cbae8d703a6542aa2032

Commit: 513ffaf4081be7d1c461cbae8d703a6542aa2032

Tree: b9aede346765bafa4fecd6168d6cc53b7b035dbe

Author: Anthony Eid

Committer: GitHub

## Message

```
agent: Clean up old remove worktree manage folder code (#54205)

This is a follow up to: #54202 

`thread_worktree_archive.rs` had its own
walk-up-and-remove-empty-parents pass that ran after archiving a Zed
managed git worktree. It duplicated logic that #54202 moved into
`Repository::remove_worktree` (which also adds remote support for this)

This PR deletes the dead code path and its associated tests.

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Closes #ISSUE

Release Notes:

- N/A
```

## Parents

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

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