Skip to content

Adds core infrastructure for Git commit signing#4875

Merged
ianhattendorf merged 11 commits intomainfrom
feature/commit-signing
Jan 30, 2026
Merged

Adds core infrastructure for Git commit signing#4875
ianhattendorf merged 11 commits intomainfrom
feature/commit-signing

Conversation

@eamodio
Copy link
Member

@eamodio eamodio commented Jan 13, 2026

Implements the implementation plan for Phase 1 of Git commit signing support, establishing the foundational architecture for cryptographic signing within the extension.

  • Core Infrastructure: Adds the ability to read and write signing configurations directly from Git global/local config, supporting GPG, SSH, and X.509 formats.
  • Signature Parsing: Updates the commits provider to lazily fetch and parse signatures from git logs, verifying status (good, bad, expired, etc.) and ownership.
  • Commit Creation: Enhances the patch provider to support signing when creating commits and unreachable commits, respecting the user's auto-sign configuration.
  • User Interface: Introduces a new status bar controller to display the current signing mode and a setup command to help users configure signing keys.
  • Integration: Hooks signing capabilities into the Composer feature, allowing generated commits to be signed.
  • Telemetry & Error Handling: Implements specific error handling for common signing issues (missing keys, passphrase failures) and adds telemetry events to track adoption and stability.

@eamodio eamodio added this to the 17.10 milestone Jan 13, 2026
@ianhattendorf ianhattendorf force-pushed the feature/commit-signing branch from e9ee95f to 1beb5c2 Compare January 22, 2026 22:12
@ianhattendorf
Copy link
Contributor

ianhattendorf commented Jan 22, 2026

I've pushed up several commits. Still outstanding (highest priority at the top, roughly):

  • Signatures are being verified more often than they should be, leading to some delays in the UI
  • Need to display an icon on inline blame hovers
  • Test X.509 support
  • Should users be able to set up signing without an active repo? (Currently the config sub-provider requires a repoPath)
image image image image

@ianhattendorf
Copy link
Contributor

Regarding the signature icon/tooltip for inline blame hovers: I don't believe it's possible to get a tooltip without making the icon a blue link. Not sure what we want to do here or if I'm missing something, I'll take another look next week.

image image

@ianhattendorf ianhattendorf force-pushed the feature/commit-signing branch 3 times, most recently from 7df0d2c to e712240 Compare January 26, 2026 18:38
@ianhattendorf ianhattendorf marked this pull request as ready for review January 26, 2026 18:50
@ianhattendorf ianhattendorf force-pushed the feature/commit-signing branch from e712240 to c275544 Compare January 26, 2026 18:59
@augmentcode
Copy link

augmentcode bot commented Jan 26, 2026

🤖 Augment PR Summary

Summary: Adds foundational infrastructure for Git commit signing support (Phase 1) across GitLens, spanning config management, signature retrieval/parsing, UI indicators, and telemetry.

Changes:

  • Adds a new Setup Commit Signing... command with a quick-pick flow to enable signing and set a signing key globally.
  • Extends the Git config sub-provider to read/write signing-related keys (e.g., commit.gpgsign, gpg.format, signing programs, SSH allowed signers file).
  • Introduces per-commit signature retrieval via git log pretty-format fields and a new GitCommit.getSignature() cache.
  • Adds a signature parser for Git’s %G* format specifiers with unit tests covering multiple status/trust cases.
  • Updates hover commit formatting to support a ${signature} token and conditionally fetch signature info when enabled.
  • Enhances the Commit Details webview to fetch/serialize signature data and renders a new <gl-signature-badge> with tooltip details.
  • Updates patch/composer commit creation to optionally sign commits (commit-tree -S) and emits new signing telemetry events for success, setup, and failure reasons.
  • Adds new user settings under “Commit Signing” to toggle signature badges and future key generation support.

🤖 Was this summary useful? React with 👍 or 👎

Copy link

@augmentcode augmentcode bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. 4 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

@ianhattendorf
Copy link
Contributor

augment review

Copy link

@augmentcode augmentcode bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. 2 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

@eamodio
Copy link
Member Author

eamodio commented Jan 27, 2026

Regarding the signature icon/tooltip for inline blame hovers: I don't believe it's possible to get a tooltip without making the icon a blue link. Not sure what we want to do here or if I'm missing something, I'll take another look next week.

image image

Yeah, only links get tooltips I'm pretty sure

@ianhattendorf ianhattendorf force-pushed the feature/commit-signing branch from d52d042 to 9ffe55e Compare January 27, 2026 18:46
@eamodio eamodio force-pushed the feature/commit-signing branch from 9ffe55e to c2aa595 Compare January 29, 2026 17:01
eamodio and others added 7 commits January 29, 2026 10:53
- Gates SSH and X509 signing options behind Git version requirements

- Changes commit signing setup to configure globally

- Adds commit signing VS Code fallback and boolean normalization

- Replaces --show-signature with Git format specifiers

- Uses SSH placeholder value if nothing entered by user
@ianhattendorf ianhattendorf force-pushed the feature/commit-signing branch from c2aa595 to e6e781c Compare January 29, 2026 17:53
 - Adds the `${signature}` token into default commit and status tooltip formats
 - Adds support for inferring GPG, SSH, and X.509 signature formats
 - Enhances signature tooltips with clearer verification status and key details
 - Integrates signature badges directly into the commit author component for better visibility
Improves accessibility by updating custom chips to use native buttons and better focus management
 - Adds a lightweight method to check for commit signatures
 - Adds short ttl caching to signature check results
 - Adopts the lightweight check in hovers and views
@eamodio eamodio requested a review from ianhattendorf January 30, 2026 05:18
@eamodio
Copy link
Member Author

eamodio commented Jan 30, 2026

This is ready IMO, though I've disabled the setup wizard for now.

@ianhattendorf ianhattendorf merged commit 84ba8fb into main Jan 30, 2026
6 checks passed
@ianhattendorf ianhattendorf linked an issue Jan 30, 2026 that may be closed by this pull request
@eamodio eamodio deleted the feature/commit-signing branch January 31, 2026 22:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Signing commits with GitLens "Compose Commits" feature

2 participants