From: Paolo Bonzini Date: Fri, 18 Jan 2008 15:51:19 GMT Subject: Re: [PATCH] git-commit: add a prepare-commit-msg hook Message-ID: <4790CAF7.5010908@gnu.org> In-Reply-To: >> The prepare-commit-msg hook is run whenever a "fresh" commit message >> (i.e. not one taken from another commit with -c) is shown in the editor. >> It can modify the commit message in-place and/or abort the commit. >> >> While the default hook just adds a Signed-Off-By line at the bottom of >> the commit messsage, the hook is more intended to build a template for >> the commit message following project standards. > > Would it not be much better for that hook to verify that the template has > not been added? I fail to parse this. > Or would not be yet even better to use the commit.template config > variable, which was intended for that purpose? The template might not necessarily be fixed, for example it could be preloaded with the list of modified files. See the cover letter for an example. Paolo