]> git.vpit.fr Git - perl/modules/rgit.git/blobdiff - lib/App/Rgit/Command.pm
Store the repos as-is in the command object
[perl/modules/rgit.git] / lib / App / Rgit / Command.pm
index 7410be77977afa88b94b165defe775c3b2b7982c..ce7bac636286209211361447e730dd3306fc045e 100644 (file)
@@ -46,15 +46,13 @@ sub new {
  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,
  );
 }