BEGIN {
if (-t && eval { use Term::ReadKey; 1 }) {
*policy = sub {
- my ($cmd, $conf, $repo, $status) = @_;
+ my ($cmd, $conf, $repo, $status, $signal) = @_;
return NEXT unless $status;
- print STDERR "git returned $status\n";
print STDERR "[a]bort, [i]gnore, [I]gnore all, [r]etry, open [s]hell ?";
ReadMode 4;
my $key = ReadKey 0;
};
} else {
*policy = sub {
- my ($cmd, $conf, $repo, $status) = @_;
+ my ($cmd, $conf, $repo, $status, $signal) = @_;
return NEXT unless $status;
- print STDERR "git returned $status, aborting\n";
return LAST;
};
}
my $code;
for (@{$conf->repos}) {
$_->chdir or next;
- $status = $_->run($conf, @{$self->args});
- $code = $self->report($conf, $_, $status) unless defined $code;
+ ($status, my $signal) = $_->run($conf, @{$self->args});
+ $code = $self->report($conf, $_, $status, $signal) unless defined $code;
last if $code & LAST;
if ($code & REDO) {
undef $code; # Don't save it, that would be very dumb