<div dir="ltr">Thanks.  I'll have a look at that.  I suspect it won't be quite what I want (because it seems like it will construct a default commit message ready to be edited with my editor).  I typically follow a "commit early, commit often" style of working on topic branches (and private projects).  As such, I like to write one-line commit messages right on the command line.  It would be nice if I could add some automation to my workflow to prepend a "[PASSED]" or "[FAILED]" string to the commit message I scribble out on the command line.<div>

<br></div><div style>So I'll keep commitfromnews in mind.  Perhaps I'll change my workflow to write my commit messages in my IDE (Emacs) instead of at the command line.</div><div style><br></div><div><div style>--wpd</div>

<div style><br></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Aug 14, 2013 at 10:42 PM, Robert Collins <span dir="ltr"><<a href="mailto:robertc@robertcollins.net" target="_blank">robertc@robertcollins.net</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On 15 August 2013 14:11, Patrick Doyle <<a href="mailto:wpdster@gmail.com">wpdster@gmail.com</a>> wrote:<br>


><br>
> 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?<br>
><br>
> 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.<br>


><br>
> So I guess a broader question might be, does anybody think this is a good idea?<br>
><br>
> (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.)<br>


<br>
</div></div>The commitfromnews plugin does something similar - it puts the items<br>
from NEWS into the default commit message.<br>
<br>
-Rob<br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
<br>
--<br>
Robert Collins <<a href="mailto:rbtcollins@hp.com">rbtcollins@hp.com</a>><br>
Distinguished Technologist<br>
HP Converged Cloud<br>
</font></span></blockquote></div><br></div>