Repository navigation
Keep #-leading lines in an annotated tag message [patch] - #209
Merged
Merged
Conversation
git tag applies strip cleanup even to a --message value, so every line starting with # was dropped as a comment: "#123 fixed the crash" left an empty tag message while git exited 0. The tag builder now passes --cleanup=whitespace with a message, matching GitCommitBuilder. Fixes #170 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KLFPeLz9EhDwj3AmatpfG6
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Fixes #170
What was wrong
Unlike
git commit,git tagapplies--cleanup=stripeven to a--messagevalue, so it drops every line that starts with#as a comment.CreateTag(...).Annotating("#123 fixed the crash")therefore created a tag with an empty message, and git still exited 0.Change
GitTagCreateBuildernow emits--cleanup=whitespace, the same pinGitCommitBuilderalready uses. Lightweight tags are unchanged.--end-of-options, for an annotated tag, and absent for a lightweight tag."#123 fixed the crash\n\n# 456 another"round-trips.Tags()reports the subject, andgit cat-file -pshows the body line kept.Verification
dotnet testpassed 803 of 803.🤖 Generated with Claude Code
https://claude.ai/code/session_01KLFPeLz9EhDwj3AmatpfG6
Generated by Claude Code