From: Johannes Schindelin Date: Fri, 18 Jan 2008 16:06:00 GMT Subject: Re: [PATCH] git-commit: add a prepare-commit-msg hook Message-ID: In-Reply-To: <4790CAF7.5010908@gnu.org> Hi, On Fri, 18 Jan 2008, Paolo Bonzini wrote: > > > > 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. What I meant is this: In the message hook, just grep if the template was already added. If it was, just return. If it was not, add it. No need for yet another hook. Ciao, Dscho