CheckLog: add a reference to OpenStack's commit policies

Signed-off-by: Gustavo L. de M. Chaves <gnustavo@cpan.org>
CheckJira: document examples for matchlog option

Signed-off-by: Gustavo L. de M. Chaves <gnustavo@cpan.org>
Detect and allow fast-forward rebases

Signed-off-by: Gustavo L. de M. Chaves <gnustavo@cpan.org>
Fix BAIL_OUT message during tests

It seems that I've left the fix in bfdd1423b7 incomplete.

Signed-off-by: Gustavo L. de M. Chaves <gnustavo@cpan.org>
Fix user.email configuration variable name

Signed-off-by: Gustavo L. de M. Chaves <gnustavo@cpan.org>
Remove t/GERRIT_CONFIG file

This file was added by mistake to the repository.

Signed-off-by: Gustavo L. de M. Chaves <gnustavo@cpan.org>
Fix plugin disabling detection

Plugins enabled in the configuration using their full module name
could not be disabled via the environment variable trick, because the
variable must have the full plugin name, but ':' characters are not
accepted in environment variable names.

Now, only the plugin's module basename is checked for.

Signed-off-by: Gustavo L. de M. Chaves <gnustavo@cpan.org>
Fix documentation

Signed-off-by: Gustavo L. de M. Chaves <gnustavo@cpan.org>
New option: githooks.disable

This option can be used to disable plugins otherwise enabled by the
githooks.plugin option. It's useful if you want to enable a plugin
globally and only disable it for some repositories.

Signed-off-by: Gustavo L. de M. Chaves <gnustavo@cpan.org>
Support Gerrit's ref-update and patchset-created hooks

Gerrit (http://gerrit.googlecode.com/) is a web-based code review
system which incorporates a Git server implemented with JGit
(http://www.eclipse.org/jgit/), which is a pure Java implementation
of Git.

Up to version 2.2.0 JGit still doesn't support Git standard
hooks. However, Gerrit implements its own special hooks
(http://gerrit-documentation.googlecode.com/svn/Documentation/2.6/
config-hooks.html), which are rather different from Git's.

Here we implement support for two of Gerrit's hooks:

* ref-update

The 'ref-update' hook is executed synchronously when a user performs a
push to a real brach and not to one of Gerrit's virtual branches
(refs/for/*). It's purpose is the same as Git's 'update' hook and
Git::Hooks's plugins support them both together.

* patchset-created

The 'patchset-created' hook is executed asynchrounously when a user
performs a push to one of Gerrit's virtual branches (refs/for/*) in
order to record a new review request. This means that one cannot stop
the request from happening just by dying inside the hook. Instead,
what one needs to do is to invoke one of Gerrit's commands to accept
or reject the new review request.

In order to support this hook Git:Hooks now implements a general way
for hooks to invoke a routine after all normal hooks have been
processed. This way, the routine can see if there was any problem and
invoke the appropriate Gerrit command to review the patchset
appropriately.

Signed-off-by: Gustavo L. de M. Chaves <gnustavo@cpan.org>
v0.041

  [New features]
  - Support Gerrit's ref-update and patchset-created hooks. Gerrit
    (http://gerrit.googlecode.com/) is a web-based code review system
    which incorporates a Git server implemented with JGit
    (http://www.eclipse.org/jgit/), which is a pure Java
    implementation of Git.  Up to version 2.2.0 JGit still doesn't
    support Git standard hooks. However, Gerrit implements its own
    special hooks
    (http://gerrit-documentation.googlecode.com/svn/Documentation/2.6/
    config-hooks.html), which are rather different from Git's.

  - New option: githooks.disable. This option can be used to disable
    plugins otherwise enabled by the githooks.plugin option. It's
    useful if you want to enable a plugin globally and only disable it
    for some repositories.

  [Fixes]
  - CheckRewrite: Detect and allow fast-forward "git rebase upstream
    base". If upstream is a decendant of base, the base-commit is
    empty. In this situation the rebase will turn out to be a simple
    fast-forward merge from base on upstream and there is nothing to
    lose.

  - Fix plugin disabling detection. Plugins enabled in the
    configuration using their full module name could not be disabled
    via the environment variable trick, because the variable must have
    the full plugin name, but ':' characters are not accepted in
    environment variable names.

  - Fix BAIL_OUT message during tests.