X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=lib%2FApp%2FRgit%2FRepository.pm;h=1b88f5cb91efabf1e8adf8e5d37b2a7f6775999b;hb=2d737d5df0b318de7cdc2d4c7c225d76f4890038;hp=93efb4cfa71eac2fa896ac83595cfb8c4a89368d;hpb=19bee8f647bfe6c94c5cb3cf6a60d7a43cbca222;p=perl%2Fmodules%2Frgit.git diff --git a/lib/App/Rgit/Repository.pm b/lib/App/Rgit/Repository.pm index 93efb4c..1b88f5c 100644 --- a/lib/App/Rgit/Repository.pm +++ b/lib/App/Rgit/Repository.pm @@ -16,11 +16,11 @@ App::Rgit::Repository - Class representing a Git repository. =head1 VERSION -Version 0.01 +Version 0.02 =cut -our $VERSION = '0.01'; +our $VERSION = '0.02'; =head1 DESCRIPTION @@ -44,7 +44,7 @@ sub new { $dir = cwd unless defined $dir; my ($repo, $bare, $name, $work); if ($args{fake}) { - $repo = $dir; + $work = $dir; } else { my @tries = ($dir); push @tries, "$dir.git" unless $dir =~ /\.git$/; @@ -85,9 +85,9 @@ C into the repository's directory. sub chdir { my $self = shift; - my $repo = $self->repo; - chdir $repo or do { - warn "Couldn't chdir into $repo: $!"; + my $dir = $self->work; + chdir $dir or do { + warn "Couldn't chdir into $dir: $!"; return; }; return 1;