Fix "Loading Commit History..." message stuck on empty repositories (#58649)

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)
- [ ] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Closes #58653

Release Notes:

- Fix "Loading Commit History..." message in History tab stuck on
projects with empty or no repositories
f56e782661Jeremy-Qian committed on 6/11/2026, 9:34:55 AM· committed by GitHubparent715cd42
1 file changedLine totals unavailable