Repository navigation
Pass --no-show-signature so Log and Commit survive log.showSignature [patch] - #179
Merged
Merged
Conversation
…[patch] With log.showSignature=true git prints each signed commit's verification ahead of the record, custom --format or not, and the parser read it as part of the commit id. Log() threw for any history containing a signed commit, and Commit() threw after git had already made the commit, because its read-back reuses the Log() vector. Fixes #135 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GUKjHWJy9iwpdVJ1NKRU1M
|
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 #135
What changed
GitLogBuilder.AppendVerbArgumentsnow adds--no-show-signatureright afterlog. Withlog.showSignature=true, git prints each signed commit's verification to stdout ahead of the record, even under a custom--format.GitLogParserwas reading that output as part of the commit id.Commit()reuses theLog()vector for itsgit log -1read-back, so this one flag fixes it too. Before the fix, a signed commit that git did make was reported to the caller as a failure, and a retry would create a duplicate.Tests
GitRoundTripTests.LogAndCommitIgnoreTheHostsShowSignatureSettingAsyncis a real-git integration test. It setslog.showSignature=true, puts a commit with a forgedgpgsigheader at HEAD (so no signing key is needed: git still runs gpg on it and prints the result), then callsLog()andCommit().GitCommitBuilderTests.TheReadBackSuppressesSignatureOutputAsyncchecks that the read-back vector carries the flag.GitLogBuilderTests.BuildsTheDefaultLogVectorhas its expected vector updated.With the fix temporarily reverted, all three fail. The integration test fails with the exception from the issue (
GitParseException: git reported a commit id that is not valid: 'gpg: …). With the fix in place, the full suite passes locally on Linux: 735/735.🤖 Generated with Claude Code
https://claude.ai/code/session_01GUKjHWJy9iwpdVJ1NKRU1M
Generated by Claude Code