title_bar: Fix worktree label showing `main` when opening a worktree directly (#54406) (cherry-pick to preview) (#54423)
zed-zippy[bot]
and
Danilo Leal
created
Cherry-pick of #54406 to preview
----
This PR fixes an issue where we'd show incorrect worktree labels when
opening a linked worktree directly. The linked worktree name would be
displayed in the project button but the dedicated worktree button would
be displaying "main", which is incorrect.
Now that we have a dedicated worktree button in the title bar, we can
make the project button always show the root repository name,
effectively matching the threads sidebar.
Release Notes:
- Fixed the title bar worktree button showing "main" when opening a
linked git worktree directly.
Co-authored-by: Danilo Leal <67129314+danilo-leal@users.noreply.github.com>