From: Vincent Pit Date: Mon, 6 Oct 2008 16:07:47 +0000 (+0200) Subject: We need to chdir back to the cwd when we are over, so revert root_repo back to cwd_repo X-Git-Tag: v0.03~4 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=f00c02ec880d4c182584fc4f046df634df67401f;p=perl%2Fmodules%2Frgit.git We need to chdir back to the cwd when we are over, so revert root_repo back to cwd_repo --- diff --git a/lib/App/Rgit/Command/Each.pm b/lib/App/Rgit/Command/Each.pm index c313dc8..ba42b12 100644 --- a/lib/App/Rgit/Command/Each.pm +++ b/lib/App/Rgit/Command/Each.pm @@ -42,7 +42,7 @@ sub run { $status = $_->run($conf, @{$self->args}); last if $status; } - $conf->root_repo->chdir; + $conf->cwd_repo->chdir; return $status; } diff --git a/lib/App/Rgit/Command/Once.pm b/lib/App/Rgit/Command/Once.pm index 24530a6..88e77f8 100644 --- a/lib/App/Rgit/Command/Once.pm +++ b/lib/App/Rgit/Command/Once.pm @@ -35,7 +35,7 @@ It implements : sub run { my ($self, $conf) = @_; - $conf->root_repo->run($conf, @{$self->args}); + $conf->cwd_repo->run($conf, @{$self->args}); } =head1 SEE ALSO diff --git a/lib/App/Rgit/Config.pm b/lib/App/Rgit/Config.pm index c59578f..ae85075 100644 --- a/lib/App/Rgit/Config.pm +++ b/lib/App/Rgit/Config.pm @@ -7,7 +7,7 @@ use Carp qw/croak/; use Cwd qw/abs_path/; use File::Spec::Functions qw/file_name_is_absolute/; -use Object::Tiny qw/root root_repo git/; +use Object::Tiny qw/root git cwd_repo/; use App::Rgit::Repository; use App::Rgit::Utils qw/validate/; @@ -46,23 +46,23 @@ sub new { return unless defined $args{git} and -x $args{git}; my $conf = 'App::Rgit::Config::Default'; eval "require $conf; 1" or croak "Couldn't load $conf: $@"; - my $r = App::Rgit::Repository->new(dir => $root, fake => 1); + my $r = App::Rgit::Repository->new(fake => 1); return unless defined $r; $conf->SUPER::new( - root => $root, - root_repo => $r, - git => $args{git}, + root => $root, + git => $args{git}, + cwd_repo => $r, ); } =head2 C -=head2 C - =head2 C =head2 C +=head2 C + Accessors. =head1 SEE ALSO