$action->();
};
$capture->stop();
-
+
use Data::Dumper;
die Dumper($@)
if $@;
-
+
my $output = join '', $capture->read;
$c->stash->{gitweb_output} = $output;
$c->stash->{template} = 'gitweb.tt2';
sub _get_commit {
my($self, $c, $haveh) = @_;
- my $h = $haveh || $c->req->param('h');
+ my $h = $haveh || $c->req->param('h') || '';
my $f = $c->req->param('f');
my $m = $c->model('Git');
# XXX This could definitely use more context.
|| Carp::croak("Couldn't find a hash for the commit object!");
-
+
(my $pd = $m->project_dir( $m->project )) =~ s{/\.git$}();
my $commit = $m->get_object($hash)
or Carp::croak("Couldn't find a commit object for '$hash' in '$pd'!");