Skip to content

Create a lightweight tag with --no-sign so tag.gpgSign cannot open an editor [patch] - #210

Merged
matt-edmondson merged 1 commit into
mainfrom
fix/183-lightweight-tag-no-sign
Oct 13, 2026
Merged

matt-edmondson merged 1 commit into
mainfrom
fix/183-lightweight-tag-no-sign

Conversation

@matt-edmondson

Copy link
Copy Markdown
Contributor

Fixes #183

What was wrong

With tag.gpgSign=true, git ignores a request for a lightweight tag and tries to make a signed annotated tag. A signed tag needs a message, so git opens an editor, and CreateTag(name).ExecuteAsync() throws GitCommandException with "There was a problem with the editor". That message says nothing about signing.

Change

  • On the lightweight path (no Annotating(...)), GitTagCreateBuilder now emits --no-sign before --end-of-options. Annotated tags are left alone, so a user's signing preference still applies to them.
  • Builder test: the CreateTag(name) vector contains --no-sign, and the CreateTag(name).Annotating(msg) vector does not.
  • Integration test: with tag.gpgSign=true in the temp repository's local config, CreateTag(name) succeeds, and Tags() reports a non-annotated tag at HEAD's commit.

Verification

🤖 Generated with Claude Code

https://claude.ai/code/session_01KLFPeLz9EhDwj3AmatpfG6


Generated by Claude Code

… editor [patch]

With tag.gpgSign=true git tries to sign a lightweight tag, which turns it into
an annotated tag that needs a message, so git opens an editor and fails with
"There was a problem with the editor". The tag builder now passes --no-sign
when no message is given. Annotated tags still follow the host's signing
preference.

Fixes #183

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KLFPeLz9EhDwj3AmatpfG6
@sonarqubecloud

Copy link
Copy Markdown

@matt-edmondson
matt-edmondson merged commit 40ef5fc into main Oct 13, 2026
16 checks passed
@matt-edmondson
matt-edmondson deleted the fix/183-lightweight-tag-no-sign branch October 13, 2026 08:21
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.

CreateTag(name) without Annotating fails with "There was a problem with the editor" when tag.gpgSign=true, so lightweight tags cannot be created

2 participants