'gitolite mirror' needs to set exit code on push failure

redis
Sitaram Chamarty 2012-11-21 20:58:07 +05:30
parent 2018267a45
commit cd838411fa
1 changed files with 2 additions and 1 deletions

View File

@ -53,10 +53,11 @@ if ( $cmd eq 'push' ) {
my $errors = 0;
for (`git push --mirror $host:$repo 2>&1`) {
$errors = 1 if $?;
print STDERR "$_" if -t STDERR or exists $ENV{GL_USER};
chomp;
if (/FATAL/) {
$errors++;
$errors = 1;
gl_log( 'mirror', $_ );
} else {
trace( 1, "mirror: $_" );