my $h = $haveh || $c->req->param('h') || '';
my $f = $c->req->param('f');
- my $m = $c->stash->{Project};
+ my $m = $c->stash->{Repository};
my $pd = $m->path;
# Either use the provided h(ash) parameter, the f(ile) parameter or just use HEAD.
sub summary : Chained('base') Args(0) {
my ( $self, $c ) = @_;
- my $project = $c->stash->{Project};
+ my $project = $c->stash->{Repository};
$c->detach('error_404') unless $project;
my $commit = $self->_get_object($c);
my @heads = @{$project->heads};
sub heads : Chained('base') Args(0) {
my ( $self, $c ) = @_;
- my $project = $c->stash->{Project};
+ my $project = $c->stash->{Repository};
$c->stash(
commit => $self->_get_object($c),
heads => $project->heads,
sub tags : Chained('base') Args(0) {
my ( $self, $c ) = @_;
- my $project = $c->stash->{Project};
+ my $project = $c->stash->{Repository};
$c->stash(
commit => $self->_get_object($c),
tags => $project->tags,
sub blame : Chained('base') Args(0) {
my($self, $c) = @_;
- my $project = $c->stash->{Project};
+ my $project = $c->stash->{Repository};
my $h = $c->req->param('h')
|| $project->hash_by_path($c->req->param('hb'), $c->req->param('f'))
|| die "No file or sha1 provided.";
sub _blob_objs {
my ( $self, $c ) = @_;
- my $project = $c->stash->{Project};
+ my $project = $c->stash->{Repository};
my $h = $c->req->param('h')
|| $project->hash_by_path($c->req->param('hb'), $c->req->param('f'))
|| die "No file or sha1 provided.";
my $commit = $self->_get_object($c, $c->req->param('hb'));
my $filename = $c->req->param('f')
|| croak("No file specified!");
- my($tree, $patch) = $c->stash->{Project}->diff(
+ my($tree, $patch) = $c->stash->{Repository}->diff(
commit => $commit,
patch => 1,
parent => $c->req->param('hpb') || undef,
sub commit : Chained('base') Args(0) {
my ( $self, $c ) = @_;
- my $project = $c->stash->{Project};
+ my $project = $c->stash->{Repository};
my $commit = $self->_get_object($c);
$c->stash(
commit => $commit,
sub commitdiff : Chained('base') Args(0) {
my ( $self, $c ) = @_;
my $commit = $self->_get_object($c);
- my($tree, $patch) = $c->stash->{Project}->diff(
+ my($tree, $patch) = $c->stash->{Repository}->diff(
commit => $commit,
parent => $c->req->param('hp') || undef,
patch => 1,
sub shortlog : Chained('base') Args(0) {
my ( $self, $c ) = @_;
- my $project = $c->stash->{Project};
+ my $project = $c->stash->{Repository};
my $commit = $self->_get_object($c, $c->req->param('hb'));
my $filename = $c->req->param('f') || '';
sub history : Chained('base') Args(0) {
my ( $self, $c ) = @_;
$self->shortlog($c);
- my $project = $c->stash->{Project};
+ my $project = $c->stash->{Repository};
my $file = $project->get_object(
$project->hash_by_path(
$project->head_hash,
sub tree : Chained('base') Args(0) {
my ( $self, $c ) = @_;
- my $project = $c->stash->{Project};
+ my $project = $c->stash->{Repository};
my $commit = $self->_get_object($c, $c->req->param('hb'));
my $filename = $c->req->param('f') || '';
my $tree = $filename
sub reflog : Chained('base') Args(0) {
my ( $self, $c ) = @_;
- my @log = $c->stash->{Project}->reflog(
+ my @log = $c->stash->{Repository}->reflog(
'--since=yesterday'
);
sub search : Chained('base') Args(0) {
my($self, $c) = @_;
$c->stash(current_action => 'GitRepos');
- my $project = $c->stash->{Project};
+ my $project = $c->stash->{Repository};
my $commit = $self->_get_object($c);
# Lifted from /shortlog.
my %logargs = (
$feed->title($host . ' - ' . Gitalist->config->{name});
$feed->updated(~~DateTime->now);
- my $project = $c->stash->{Project};
+ my $project = $c->stash->{Repository};
my %logargs = (
sha1 => $project->head_hash,
count => Gitalist->config->{paging}{log} || 25,
sub rss : Chained('base') Args(0) {
my ($self, $c) = @_;
- my $project = $c->stash->{Project};
+ my $project = $c->stash->{Repository};
my $rss = XML::RSS->new(version => '2.0');
$rss->channel(
my $format = $c->req->param('sf') || 'tgz';
die unless $format;
my $sha1 = $c->req->param('h') || $self->_get_object($c)->sha1;
- my @snap = $c->stash->{Project}->snapshot(
+ my @snap = $c->stash->{Repository}->snapshot(
sha1 => $sha1,
format => $format
);
my $project = $c->req->param('p');
if (defined $project) {
eval {
- $c->stash(Project => $c->model('GitRepos')->get_project($project));
+ $c->stash(Repository => $c->model('GitRepos')->get_project($project));
};
if ($@) {
$c->detach('/error_404');
}
}
- my $a_project = $c->stash->{Project} || $c->model()->projects->[0];
+ my $a_project = $c->stash->{Repository} || $c->model()->projects->[0];
$c->stash(
git_version => $a_project->run_cmd('--version'),
version => $Gitalist::VERSION,
sub end : ActionClass('RenderView') {
my ($self, $c) = @_;
# Give project views the current HEAD.
- if ($c->stash->{Project}) {
- $c->stash->{HEAD} = $c->stash->{Project}->head_hash;
+ if ($c->stash->{Repository}) {
+ $c->stash->{HEAD} = $c->stash->{Repository}->head_hash;
}
}