Repository navigation
Keep "#" lines in a commit message where the host strips comments [patch] - #203
Merged
Merged
Conversation
…tch] Commit() never pinned --cleanup, so commit.cleanup=strip (or scissors) in the host's git config made git drop every "#"-leading line of the message: "#123 fixed the crash" vanished from the body without a word, and a "#42: fix login" subject aborted the commit as empty. Always pass --cleanup=whitespace, which is git's own default for a message that never opens an editor, so unconfigured hosts store the same message as before. Fixes #140 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01NwJrDAUtukhDgLo9pAfR3t
Contributor
Author
|
So something in the suite occasionally hangs on the shared pipeline's macOS runner, regardless of the change. I'm re-running the failed jobs once. If it hangs again, the next step is to find the stuck test, which the job log should name now that it's available. Generated by Claude Code |
|
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 #140
What was wrong
GitCommitBuilderpassed the message through--messagebut never pinned--cleanup. Withcommit.cleanup=strip(orscissors) in the host's git config, git treated every#-leading line as a comment:#123 fixed the crashwas dropped from the stored body, and the read-backGitCommitreported the truncated body, so the caller couldn't tell.#42: fix loginsubject made git abort with "empty commit message".Change
Commit()always emits--cleanup=whitespace. That is git's own default for a message that never opens an editor, so an unconfigured host stores the same message as before.status.showUntrackedFiles,log.showSignature).Tests
GitCommitBuilderTests.BuildsTheDefaultCommitVectornow expects the flag. The newPinsTheMessageCleanupModeAheadOfTheMessagetest checks it appears exactly once, before the message.CommitKeepsHashLinesEvenWhereTheHostStripsCommentsAsyncsetscommit.cleanup=stripin the throwaway repository's config, then checks that a#-leading body line and a#-leading subject both survive.#line. With the fix in place, the full suite passes: 776/776 on net10.0 (Linux).🤖 Generated with Claude Code
https://claude.ai/code/session_01NwJrDAUtukhDgLo9pAfR3t
Generated by Claude Code