Skip to content

git_ui: Fix showing commit history in detached HEAD state - #58010

Closed
mertkanakkoc wants to merge 19 commits into
zed-industries:mainfrom
mertkanakkoc:fix-commit-history-git-panel
Closed

git_ui: Fix showing commit history in detached HEAD state#58010
mertkanakkoc wants to merge 19 commits into
zed-industries:mainfrom
mertkanakkoc:fix-commit-history-git-panel

Conversation

@mertkanakkoc

Copy link
Copy Markdown
Contributor

Self-Review Checklist:

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

Closes #57783

When a repository is in detached HEAD state (e.g. after git checkout <sha>), the branch field is None and the history tab was silently returning early, showing nothing.

This change falls back to HEAD as the log source when no branch is active, so commit history is displayed from the current HEAD position.

Release Notes:

  • Fixed commit history not displaying when repository is in detached HEAD state.

@cla-bot cla-bot Bot added the cla-signed The user has signed the Contributor License Agreement label May 28, 2026
@zed-community-bot zed-community-bot Bot added the first contribution the author's first pull request to Zed. NOTE: the label application is automated via github actions label May 28, 2026
@maxdeviant maxdeviant changed the title git_ui/git_panel: fix to show commit history in detached HEAD state git_ui: Fix showing commit history in detached HEAD state May 28, 2026
@smitbarmase smitbarmase added the area:integrations/git Git integration feedback label May 29, 2026
@mertkanakkoc

Copy link
Copy Markdown
Contributor Author

before open this pr, i did not see the #57959 . because i only looked the bug issue #57783 whether there is an open pr about this issue or not. It seems that #57959 solves the same fix and more

@smitbarmase smitbarmase self-assigned this Jun 1, 2026
@smitbarmase

Copy link
Copy Markdown
Member

Thanks, as you pointed out, I'm closing this in favor of #57959.

@mertkanakkoc

Copy link
Copy Markdown
Contributor Author

you are welcome :)

@mertkanakkoc
mertkanakkoc deleted the fix-commit-history-git-panel branch June 16, 2026 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:integrations/git Git integration feedback cla-signed The user has signed the Contributor License Agreement first contribution the author's first pull request to Zed. NOTE: the label application is automated via github actions

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

Git history missing for detached branch

2 participants