Skip to content

git_graph: Fix infinite loading for empty repos - #58959

Merged
Anthony-Eid merged 2 commits into
mainfrom
fix-git-graph-infinite-loading
Jun 9, 2026
Merged

git_graph: Fix infinite loading for empty repos#58959
Anthony-Eid merged 2 commits into
mainfrom
fix-git-graph-infinite-loading

Conversation

@Anthony-Eid

@Anthony-Eid Anthony-Eid commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

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:

  • I've reviewed my own diff for quality, security, and reliability
  • Unsafe blocks (if any) have justifying comments
  • The content adheres to Zed's UI standards (UX/UI and icon guidelines)
  • Tests cover the new/changed behavior
  • Performance impact has been considered and is acceptable

Closes #53399

Release Notes:

  • Fixed git graph loading forever for empty repositories.

@cla-bot cla-bot Bot added the cla-signed The user has signed the Contributor License Agreement label Jun 9, 2026
@zed-community-bot zed-community-bot Bot added the staff Pull requests authored by a current member of Zed staff label Jun 9, 2026
@cole-miller
cole-miller self-requested a review June 9, 2026 18:45
@Anthony-Eid
Anthony-Eid added this pull request to the merge queue Jun 9, 2026
Merged via the queue into main with commit 14a76ba Jun 9, 2026
35 checks passed
@Anthony-Eid
Anthony-Eid deleted the fix-git-graph-infinite-loading branch June 9, 2026 23:38
This was referenced Jun 18, 2026
jonx pushed a commit to jonx/zed-aros that referenced this pull request Jul 17, 2026
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 zed-industries#53399


Release Notes:

- Fixed git graph loading forever for empty repositories.
jolutz pushed a commit to jolutz/zed that referenced this pull request Aug 8, 2026
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 zed-industries#53399


Release Notes:

- Fixed git graph loading forever for empty repositories.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement staff Pull requests authored by a current member of Zed staff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

git_graph: loads infinitely when the root folder does not contain a .git directory but includes multiple subfolders with separate Git repositories

2 participants