Stephen Frost wrote:

> > OK, but keep in mind whatever script committers user should remove tags
> > that are empty after exiting the editor.  I can provide the grep regex
> > in git somewhere too:
> > 
> >   egrep -v 
> > "^(Author|Reported-by|Bug|Reviewed-by|Tested-by|Backpatch-through): *$"
> If the template is there then, for my part at least, I wouldn't mind
> killing the empty lines.  Having a decent script would work too, of
> course... but I have to admit that I've not tried having a script modify
> my commit messages right before they're committed and, well, it'd take a
> bit for me to be comfortable with it.
> No one wants garbled commit messages from a script that went awry. ;)

Maybe it'd be better to have the lines start with a # , because then
git commit itself removes those as comments.  So the committer would
need to remove the # and then fill in the data for the field.

git-commit(1) says:

       -t <file>, --template=<file>
           When editing the commit message, start the editor with the contents
           in the given file. The commit.template configuration variable is
           often used to give this option implicitly to the command. This
           mechanism can be used by projects that want to guide participants
           with some hints on what to write in the message in what order. If
           the user exits the editor without editing the message, the commit
           is aborted. This has no effect when a message is given by other
           means, e.g. with the -m or -F options.

Álvaro Herrera      
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Sent via pgsql-hackers mailing list (
To make changes to your subscription:

Reply via email to