my $repository = $c->stash->{Repository};
my $commit = $c->stash->{Commit};
my $tree_obj = $c->stash->{filename}
- ? $repository->get_object($commit->sha_by_path($c->stash->{filename}))
+ ? $commit->sha_by_path($c->stash->{filename})
: $commit->tree->[0]
;
$c->stash(
my($self, $c) = @_;
my $repository = $c->stash->{Repository};
- # WTF?
+
my $blame = $c->stash->{Commit}->blame($c->stash->{filename}, $c->stash->{Commit}->sha1);
$c->stash(
blame => $blame,
$c->forward('Model::ContentMangler');
};
+=encoding UTF-8
+
+=head1 NAME
+
+Gitalist::Controller::Fragment::Ref - Fragment::Ref module for Gitalist::Controller
+
=head2 blob
The blob action i.e the contents of a file.
my %logargs = (
sha1 => $c->stash->{Commit}->sha1,
- count => 25, #Gitalist->config->{paging}{log} || 25,
+ count => Gitalist->config->{paging}{log} || 25,
($filename ? (file => $filename) : ())
);
my $commit = $repository->get_object('HEAD');
- my $file = $repository->get_object($commit->sha_by_path($filename));
+ my $file = $commit->sha_by_path($filename);
my $page = $c->req->param('pg') || 0;
$logargs{skip} = $c->req->param('pg') * $logargs{count}
refs => $repository->references,
filename => $filename,
filetype => $file->type,
+ page => $page,
);
};