-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't preserve commit message when it's unchanged from initial message
Sometimes we populate the commit message panel with a pre-created commit message. The two cases where this happens is: - you type `w` to commit, in which case we put the skipHookPrefix in the subject - you have a commitPrefix pattern, in which case we match it against the branch name and populate the subject with the replacement string if it matches In either case, if you have a preserved commit message, we use that. Now, when you use either of these and then cancel, we preserve that initial, unchanged message and reuse it the next time you commit. This has two problems: it strips spaces, which is a problem for the commitPrefix patterns, which often end with a space. And also, when you change your config to experiment with commitPrefix patterns, the change seemingly doesn't take effect, which can be very confusing. To fix both of these problems, only preserve the commit message when it is not identical to the initial message.
- Loading branch information
1 parent
ec92d92
commit 3a30211
Showing
3 changed files
with
13 additions
and
6 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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