# git_graph: Fix infinite loading for empty repos \(\#58959\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 14a76ba9c71153a8d3ffe2925671e4d3e410cef8

Requested commit: 14a76ba9c71153a8d3ffe2925671e4d3e410cef8

Commit: 14a76ba9c71153a8d3ffe2925671e4d3e410cef8

Tree: e5fa19255e32ccd5d35ac5d8489f7e1a73cd8f29

Author: Anthony Eid

Committer: GitHub

## Message

```
git_graph: Fix infinite loading for empty repos (#58959)

Fixes git graph showing an infinite loading state for repositories with
no commits. The bug happened because an empty `git log --all` result
completed successfully with zero commits, but the UI treated a loaded
graph with `0` commits as still loading instead of showing the empty
state.

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

Closes #53399


Release Notes:

- Fixed git graph loading forever for empty repositories.
```

## Parents

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

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