sub tree : Local {
my ( $self, $c ) = @_;
-
+ $c->stash(current_model => 'GitRepos');
+ my $project = $c->stash->{Project};
my $commit = $self->_get_commit($c, $c->req->param('hb'));
- my $tree = $c->model()->get_object($c->req->param('h') || $commit->tree_sha1);
+ my $tree = $project->get_object($c->req->param('h') || $commit->tree_sha1);
$c->stash(
# XXX Useful defaults needed ...
commit => $commit,
tree => $tree,
- tree_list => [$c->model()->list_tree($tree->sha1)],
+ tree_list => [$project->list_tree($tree->sha1)],
path => $c->req->param('f') || '',
action => 'tree',
);
sub reflog : Local {
my ( $self, $c ) = @_;
-
- my @log = $c->model()->reflog(
+ $c->stash(current_model => 'GitRepos');
+ my @log = $c->stash->{Project}->reflog(
'--since=yesterday'
);
sub search : Local {
my($self, $c) = @_;
-
+ $c->stash(current_action => 'GitRepos');
+ my $project = $c->stash->{Project};
my $commit = $self->_get_commit($c);
# Lifted from /shortlog.
my %logargs = (
$c->stash(
commit => $commit,
- results => [$c->model()->list_revs(%logargs)],
+ results => [$project->list_revs(%logargs)],
action => 'search',
# This could be added - page => $page,
);