mirror of
https://github.com/git/git.git
synced 2024-11-18 04:14:01 +01:00
Merge branch 'ap/cvsserver'
* ap/cvsserver: Have git-cvsserver call hooks/update before really altering the ref Acked-by: Martin Langhoff <martin@catalyst.net.nz>
This commit is contained in:
commit
7e53607c95
@ -1171,6 +1171,21 @@ sub req_ci
|
||||
exit;
|
||||
}
|
||||
|
||||
# Check that this is allowed, just as we would with a receive-pack
|
||||
my @cmd = ( $ENV{GIT_DIR}.'hooks/update', "refs/heads/$state->{module}",
|
||||
$parenthash, $commithash );
|
||||
if( -x $cmd[0] ) {
|
||||
unless( system( @cmd ) == 0 )
|
||||
{
|
||||
$log->warn("Commit failed (update hook declined to update ref)");
|
||||
print "error 1 Commit failed (update hook declined)\n";
|
||||
close LOCKFILE;
|
||||
unlink($lockfile);
|
||||
chdir "/";
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
print LOCKFILE $commithash;
|
||||
|
||||
$updater->update();
|
||||
|
Loading…
Reference in New Issue
Block a user