Git::MoreHooks::CheckCommitBase - CheckCommit base file
version 0.015
Use package via Git::Hooks interface (git config file).
Base for Commit checking hooks.
Package Git::MoreHooks is currently being developed so changes in the existing hooks are possible.
use Git::MoreHooks::CheckCommitBase; $::ROOT_FUNC = \&my_check_function;
Alternatively:
use Git::MoreHooks::CheckCommitBase \&my_check_function;
Git::MoreHooks::CheckCommitBase hooks itself to the hooks below:
pre-commit
This hook is invoked during the commit.
update
This hook is invoked multiple times in the remote repository during git push, once per branch being updated.
git push
pre-receive
This hook is invoked once in the remote repository during git push.
ref-update
This hook is invoked when a push request is received by Gerrit Code Review.
patchset-created
This hook is invoked when a push request is received by Gerrit Code Review for a virtual branch (refs/for/*).
draft-published
The draft-published hook is executed when the user publishes a draft change, making it visible to other users.
This plugin is configured by the following git options.
By default, the message of every commit is checked. If you want to have them checked only for some refs (usually some branch under refs/heads/), you may specify them with one or more instances of this option.
The refs can be specified as a complete ref name (e.g. "refs/heads/master") or by a regular expression starting with a caret (^), which is kept as part of the regexp (e.g. "^refs/heads/(master|fix)").
^
This module exports the following routines that can be used directly without using all of Git::Hooks infrastructure.
This is the routine used to implement the pre-commit hook. It needs a Git::More object.
Git::More
This is the routine used to implement the update hook. It needs a Git::More object.
This is the routine used to implement the pre-receive hook. It needs a Git::More object and a commit hash from Git::More::get_commit().
Git::More::get_commit()
This is the routing used to implement the update and the pre-receive hooks. It needs a Git::More object.
This is the routine used to implement the patchset-created Gerrit hook. It needs a Git::More object and the hash containing the arguments passed to the hook by Gerrit.
This is the routine used to implement the draft-published Gerrit hook. It needs a Git::More object and the hash containing the arguments passed to the hook by Gerrit.
Thanks go to Gustavo Leite de Mendonça Chaves for his Git::Hooks package.
'Mikko Koivunalho <mikko.koivunalho@iki.fi>'
This software is copyright (c) 2022 by Mikko Koivunalho.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Git::MoreHooks, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Git::MoreHooks
CPAN shell
perl -MCPAN -e shell install Git::MoreHooks
For more information on module installation, please visit the detailed CPAN module installation guide.