X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=git-cvsserver.perl;h=84520e7ad5c1745b14db2206189bb7d54c17dcc8;hb=50cfde14531a5b354bbc3a070fe39c1ee86e2915;hp=9371788fab427ab8605cb8c993a1520e36ad819e;hpb=b4d2b04c9b6dc42c0bcf0513b9d8f731ec26db82;p=git.git diff --git a/git-cvsserver.perl b/git-cvsserver.perl index 9371788fa..84520e7ad 100755 --- a/git-cvsserver.perl +++ b/git-cvsserver.perl @@ -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();