[MERGE][RFC] Enhanced hooks

Ian Clatworthy ian.clatworthy at internode.on.net
Tue Feb 5 01:02:07 GMT 2008


Jelmer Vernooij wrote:

> I think the syntax in the configuration file is a bit complex. Git and
> mercurial simply allow::
> 
> 	[hooks]
> 	pre-commit = foo.sh
> 	post-commit = bar.sh
> 
> Using a separate section per hook seems overkill to me.

> Also, there are now two word separator characters used, '_' and ' '.
> It would be nice if the character used could be consistent, e.g.::
> 
> 	[pre-commit-hooks]
> 	foo=foo.sh

I'm fine with [pre-commit-hooks] instead of [pre_commit hooks].

It's true that

  [pre-commit-hooks]
  foo = foo.sh
  [post-commit-hooks]
  bar = bar.sh

is slightly more complex that the Hg approach. But I prefer it because
its good practice to label hooks anyway and it scales nicer for multiple
hooks.

Ian C.



More information about the bazaar mailing list