# git: Recover branch refs when metadata lookup fails \(\#57285\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 786eb245214f04818d744440366c04c4a76b30b8

Requested commit: 786eb245214f04818d744440366c04c4a76b30b8

Commit: 786eb245214f04818d744440366c04c4a76b30b8

Tree: 798dbc467f51c930973bf628c91e412f80c97e6e

Author: Mikhail Pertsev

Committer: GitHub

## Message

```
git: Recover branch refs when metadata lookup fails (#57285)

cc @cole-miller 

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

Release Notes:

- Fixed branch enumeration when a broken Git ref prevents commit
metadata from being read.

---------

Co-authored-by: Cole Miller <cole@zed.dev>
```

## Parents

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

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