[oe] update hook for git to check push commit message

Jens Seidel jensseidel at users.sf.net
Fri Jan 29 08:21:38 UTC 2010


On Thu, Jan 28, 2010 at 04:22:32PM -0700, Chris Larson wrote:
> 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:
> > > Attached is a small hook for updates that are pushed into repo.
> >
> > 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.

Right, what about two repositories, one with a hook which denies some
commits and another one without such a hook. The second repository could be
synced with the first via a cronjob and users are always forced to commit
to the first repository except they know *exactly* what they are doing
(maybe by restricting access to a few people only) and want to bypass these
checks?

Jens




More information about the Openembedded-devel mailing list