This repository was archived by the owner on Dec 15, 2022. It is now read-only.
Revisit commit message processing #1500
Merged
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.
Revisit the ways that we preprocess commit messages - both in JavaScript and in choosing a
--cleanupargument togit commit- to better handle some edge cases and bugs.GitShellOutStrategy.getHeadCommit()was stripping newlines from the message body of any parsed commit, which was altering amended commit messages. Added--cleanup=verbatimas well to ensure that the message isn't manipulated by git either.{verbatim}option toGitShellOutStrategy.commit(). When set totrue, the message argument is used for the commit exactly as-is. When set tofalse, ifcommit.cleanupis set to a value and is not"default", default to"strip".#lines).{verbatim: true}when committing from the mini editor, but not from a full editor.Note that I'm defaulting
--cleanupto"strip"for non-verbatim commits instead of"whitespace". My logic here is that committing through Atom with a full-editor message feels more like editing a message in$EDITORand committing than it does doing acommit -m, so we want to act like git "when the message is to be edited":