# project_panel: Allow renaming a root to match a child directory \(\#64268\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 02238cd4b7523f31e6c9f920ea65382193b0ea76

Requested commit: 02238cd4b7523f31e6c9f920ea65382193b0ea76

Commit: 02238cd4b7523f31e6c9f920ea65382193b0ea76

Tree: 4ebc73dbbc564298188ab8a267c5a6c72e27fda5

Author: D4r3N

Committer: GitHub

## Message

```
project_panel: Allow renaming a root to match a child directory (#64268)

# Objective

- Allow renaming a project root folder to the same name as one of its
child folders.
- Fixes #64255

## Solution

- Skip child-entry collision checks when renaming a project root.
- Keep existing collision checks for other entries.

## Testing

- Updated and ran `test_rename_root_of_worktree`.
- Manually tested on macOS.

## 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 adheres to Zed's UI standards
([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
and
[icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md)
guidelines)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

---

Release Notes:

- Fixed an issue where a project root folder could not be renamed to
match a child folder.

---------

Co-authored-by: dino <dinojoaocosta@gmail.com>
```

## Parents

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

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