Skip to content

git: Disable log.showSignature for internal commands#55708

Merged
Anthony-Eid merged 3 commits into
zed-industries:mainfrom
toddlerer:fix/git-log-show-signature
May 16, 2026
Merged

git: Disable log.showSignature for internal commands#55708
Anthony-Eid merged 3 commits into
zed-industries:mainfrom
toddlerer:fix/git-log-show-signature

Conversation

@toddlerer

@toddlerer toddlerer commented May 4, 2026

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 #53604.

When log.showSignature = true, git prepends signature verification lines to stdout before the --format output. The null-separated parsers in crates/git/src/repository.rs weren't expecting that, so SHAs ended up corrupted — the git graph detail panel showed "0 changed files" for every commit, and file history was similarly broken.

Setting -c log.showSignature=false in build_command is the same trick we already use for core.fsmonitor. It only affects log/show/whatchanged, so other commands aren't touched.

Verified locally with an SSH-signed repo: before this change the detail panel said "0 changed files"; after, the modified files show up correctly.

Release Notes:

  • git_graph: Fix breakage that occurs when log.showSignature is enabled

When users have `log.showSignature = true` configured globally, git
prepends signature verification lines (e.g. "No signature\n", "gpg:
Signature made ...") to stdout before the user-supplied --format
output. This corrupted the null-byte-separated parsers used by
`git show` and `git log --follow` paths, causing the "0 changed
files" misreport in the git graph detail panel and breaking file
history.

Override the setting to false in build_command, mirroring the
existing core.fsmonitor=false override. The flag is only meaningful
for log/show/whatchanged so it has no effect on other commands.

Closes zed-industries#53604
@cla-bot

cla-bot Bot commented May 4, 2026

Copy link
Copy Markdown

We require contributors to sign our Contributor License Agreement, and we don't have @toddlerer on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'.

@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 4, 2026
@toddlerer

Copy link
Copy Markdown
Contributor Author

@cla-bot check

@cla-bot cla-bot Bot added the cla-signed The user has signed the Contributor License Agreement label May 4, 2026
@cla-bot

cla-bot Bot commented May 4, 2026

Copy link
Copy Markdown

The cla-bot has been summoned, and re-checked this pull request!

@Anthony-Eid

Copy link
Copy Markdown
Contributor

Thank you for fixing this!

@Anthony-Eid Anthony-Eid enabled auto-merge May 16, 2026 18:45
@Anthony-Eid Anthony-Eid added this pull request to the merge queue May 16, 2026
Merged via the queue into zed-industries:main with commit b7d48eb May 16, 2026
32 checks passed
@toddlerer

Copy link
Copy Markdown
Contributor Author

Thanks for the review and merge, and for the rationale comments on the neighboring overrides!

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's log.showSignature config set to true breaks file history and git graph

4 participants