From cd838411faede4819f5c00c77ded802d059294f9 Mon Sep 17 00:00:00 2001 From: Sitaram Chamarty Date: Wed, 21 Nov 2012 20:58:07 +0530 Subject: [PATCH] 'gitolite mirror' needs to set exit code on push failure --- src/commands/mirror | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/commands/mirror b/src/commands/mirror index 16c14dd..d091979 100755 --- a/src/commands/mirror +++ b/src/commands/mirror @@ -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: $_" );