+7

Customizable message format for cherrypick commits

Christopher Kline 8 years ago updated 8 years ago 3

Our team would very much like the ability to customize the format of a cherrypick commit message, by specifying a format string in the smartgit.properties file. We are imagining a format like:

-Dsmartgit.cherryPick.customCommitMessage="(CP %2 from %4) %3 (Cherry picked from commit %1)"
Where


%1 = full SHA
%2 = short SHA
%3 = original commit message text

%4 = branch original commit was cherrypicked from


That would really help us understand our development flow better when looking at complicated branch hierarchies in the log window, as we could make it immediately clear when a commit is a cherrypick, and where it came from.


It also allows us to add information we need to the commit message to enhance our build and code review automation.

Yes, I am aware of that option. However, there is no control of the format or the placement of the text it appends to the commit message. That is the reason for this feature request.

Update: it seems like similar functionality already exists for customizing "revert" commit messages: http://www.syntevo.com/doc/display/SG/System+Properties#SystemProperties-smartgit.revert.commitMessageTemplateproperties.


Perhaps that can be used as a starting point for implementing this feature?