Example start_commit/pre_commit hook that modifies commit message

Patrick Doyle wpdster at gmail.com
Thu Aug 15 02:11:33 UTC 2013


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.)

--wpd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/bazaar/attachments/20130814/3a996d94/attachment.html>


More information about the bazaar mailing list