Skip to content

Commit

Permalink
Make it work with bare repos, via GitStore->new(repo => '/path/to/som…
Browse files Browse the repository at this point in the history
…e/repo.git').
  • Loading branch information
chrisforbes committed Mar 22, 2012
1 parent c67cb66 commit c860a9d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/GitStore.pm
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ has 'git' => (
isa => 'Git::PurePerl',
lazy => 1,
default => sub {
Git::PurePerl->new( directory => shift->repo );
my $repo = shift->repo;
return Git::PurePerl->new( gitdir => $repo ) if $repo =~ m/\.git$/;
return Git::PurePerl->new( directory => $repo );
}
);

Expand Down

0 comments on commit c860a9d

Please sign in to comment.