From: Vincent Pit Date: Sun, 5 Oct 2008 21:32:18 +0000 (+0200) Subject: Store the repos as-is in the command object X-Git-Tag: v0.02~9 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;ds=sidebyside;h=308f8d7bc585e1106eb77d183c6e74ab130e0ded;hp=f34c972acf43aff431228979855d39fbd7c52faf;p=perl%2Fmodules%2Frgit.git Store the repos as-is in the command object --- diff --git a/lib/App/Rgit/Command.pm b/lib/App/Rgit/Command.pm index 7410be7..ce7bac6 100644 --- a/lib/App/Rgit/Command.pm +++ b/lib/App/Rgit/Command.pm @@ -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, ); }