# Improve bare repo support \(\#55153\) · gitcafe/zed

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

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

Visibility: public

Requested revision: caccc65b1e04abb6811d4c601eb793cb20c90541

Requested commit: caccc65b1e04abb6811d4c601eb793cb20c90541

Commit: caccc65b1e04abb6811d4c601eb793cb20c90541

Tree: eefb13d9b5ed13f2c9ecb0a0a63218cb6ebf5f01

Author: Max Brunsfeld

Committer: GitHub

## Message

```
Improve bare repo support (#55153)

Fixes https://github.com/zed-industries/zed/issues/54830

This fixes a bugs where
* when there's no main worktree, we treated the first linked worktree as
main
* the titlebar and sidebar showed two different things when opening a
linked wortree directly

When there's no main worktree, our "project group key" will be the bare
repo path. For displaying this to the user, we try to present something
meaningful:
* If the bare repo is `foo.git`, we'll say "foo"
* If the bare repo is "bar/.bare", we'll "bar"

Release Notes:

- Fixed bugs in Zed's sidebar and titlebar when editing in git worktrees
created from bare repositories.
```

## Parents

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

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