]> git.vpit.fr Git - perl/modules/rgit.git/commitdiff
We need to chdir back to the cwd when we are over, so revert root_repo back to cwd_repo
authorVincent Pit <vince@profvince.com>
Mon, 6 Oct 2008 16:07:47 +0000 (18:07 +0200)
committerVincent Pit <vince@profvince.com>
Mon, 6 Oct 2008 16:07:47 +0000 (18:07 +0200)
lib/App/Rgit/Command/Each.pm
lib/App/Rgit/Command/Once.pm
lib/App/Rgit/Config.pm

index c313dc815b760250378c0b95a591a3e827418aac..ba42b1269398d020fc48ce72f9b4e8ada43c74e9 100644 (file)
@@ -42,7 +42,7 @@ sub run {
   $status = $_->run($conf, @{$self->args});
   last if $status;
  }
- $conf->root_repo->chdir;
+ $conf->cwd_repo->chdir;
  return $status;
 }
 
index 24530a668dd91fbb614267ce9a802ee3d3df75d6..88e77f892511a122a7c3a3f11966172b76400be5 100644 (file)
@@ -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
index c59578f519511041d62b753c4fa52ee5047f75ef..ae850758197bd429fa540b8341ded6db55f187e0 100644 (file)
@@ -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<root>
 
-=head2 C<root_repo>
-
 =head2 C<git>
 
 =head2 C<repos>
 
+=head2 C<cwd_repo>
+
 Accessors.
 
 =head1 SEE ALSO