[oe] update hook for git to check push commit message
clarson at kergoth.com
Fri Jan 29 00:22:32 CET 2010
On Thu, Jan 28, 2010 at 3:59 PM, Tom Rini <tom_rini at mentor.com> wrote:
> On Thu, 2010-01-28 at 12:00 -0800, Khem Raj wrote:
> > Hi
> > Attached is a small hook for updates that are pushed into repo.
> > Right now it only checks the first line of the commit and expects
> > module: summary
> Is there any way to force the commit to happen, even if the script
> doesn't like it? Can the script edit the commit message, even? ie if
> there's no git commit --ignore-prehook type option, could it see if the
> first line is FORCE or something, edit that out and commit? This will
> catch the poorly formed commit messages without being a big burden on
> people doing things that don't fit well into the "module: summary" model
> (that said, lib*-perl-native: Convert to BBCLASSEXTEND as a first line
> makes sense to me).
My worry with editing a commit at push time is, the user's local repository
now no longer matches upstream. One would hope a rebase would intelligently
handle it, but from a configuration management perspective I don't think
modifying commits behind the user's back is a very sane thing.
Now, if you did this locally at commit time rather than push time, I think
that would be less crazy, but unfortunately a clone can't bring along hooks
clarson at kergoth dot com
clarson at mvista dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
MontaVista Software, Inc.
More information about the Openembedded-devel