Example start_commit/pre_commit hook that modifies commit message
robertc at robertcollins.net
Thu Aug 15 02:42:50 UTC 2013
On 15 August 2013 14:11, Patrick Doyle <wpdster at gmail.com> wrote:
> I would like to write a start_commit or pre_commit hook that modifies my commit message. Can anybody point me at an example of a hook that does this?
> If you're interested in more details, I am following a test driven development process, and would like to automatically run my unit tests on every commit. I would like automatically edit my commit message to reflect whether this particular commit passes all of my unit tests or fails one or more of them.
> So I guess a broader question might be, does anybody think this is a good idea?
> (Since this is for a private development process, I'm the only person that would benefit or be harmed by this idea. For a shared, public development process, I might be interested in implementing this idea on my private topic branches, but, obviously, would only want to publish results for which unit tests passed.)
The commitfromnews plugin does something similar - it puts the items
from NEWS into the default commit message.
Robert Collins <rbtcollins at hp.com>
HP Converged Cloud
More information about the bazaar