(!!) trigger mechanism... read below
new triggers: - PRE_GIT and POST_GIT in gitolite-shell - PRE_CREATE and POST_CREATE when a new wild repo is created - (POST_COMPILE had already existed) - ACCESS_CHECK triggers both in gitolite-shell and the update hook - trace() learned to print the file name if called from top level and a function name is not available note: trigger was called 'run-all' and only had POST_COMPILE. The code existed in gitolite-shell, but is now moved to Rc.pm.
This commit is contained in:
parent
80b50f3be8
commit
d853c58ada
8 changed files with 46 additions and 34 deletions
|
@ -10,6 +10,7 @@ package Gitolite::Hooks::Update;
|
|||
|
||||
use Exporter 'import';
|
||||
|
||||
use Gitolite::Rc;
|
||||
use Gitolite::Common;
|
||||
use Gitolite::Conf::Load;
|
||||
|
||||
|
@ -28,6 +29,7 @@ sub update {
|
|||
my $ret = access( $ENV{GL_REPO}, $ENV{GL_USER}, $aa, $ref );
|
||||
trace( 1, "access($ENV{GL_REPO}, $ENV{GL_USER}, $aa, $ref)", "-> $ret" );
|
||||
gl_log( 'update:check', $ENV{GL_REPO}, $ENV{GL_USER}, $aa, $ref, '->', $ret );
|
||||
trigger('ACCESS_CHECK', $ENV{GL_REPO}, $ENV{GL_USER}, $aa, $ref, $ret);
|
||||
_die $ret if $ret =~ /DENIED/;
|
||||
|
||||
check_vrefs( $ref, $oldsha, $newsha, $oldtree, $newtree, $aa );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue