# Fix worktree ordering with \`PathList\` \(\#39944\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 237474a889ea9025e6d06788f1b7e14630219e27

Requested commit: 237474a889ea9025e6d06788f1b7e14630219e27

Commit: 237474a889ea9025e6d06788f1b7e14630219e27

Tree: e86e50765fa0097310f00e127528cf3b81aac5b4

Author: Elliot Thomas

Committer: GitHub

## Message

```
Fix worktree ordering with `PathList` (#39944)

The recent introduction of PathList removed some of the ordering logic
resulting in paths always being alphabetised.

This change restores the previous logic for sorting worktrees in a
project using the newer PathList type.

Closes #39934

Release Notes:

- Fixed manual worktree reordering

<details>

<summary>Screen recording of it retaining the order</summary>


https://github.com/user-attachments/assets/0197d118-6ea7-4d2d-8fec-c917fcb9d277

</details>

---------

Co-authored-by: MrSubidubi <finn@zed.dev>
```

## Parents

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

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