my $action = $class->action($cmd);
croak "Command $cmd shouldn't be executed as an $action"
unless $class eq __PACKAGE__ or $class->isa($action);
- my @repos = grep $_->isa('App::Rgit::Repository'),
- ref $args{repos} eq 'ARRAY' ? @{$args{repos}} : $args{repos};
eval "require $action; 1" or croak "Couldn't load $action: $@";
my $r = App::Rgit::Repository->new(fake => 1);
return unless defined $r;
$action->SUPER::new(
cmd => $cmd,
args => $args{args} || [ ],
- repos => \@repos,
+ repos => $args{repos},
cwd_as_repo => $r,
);
}