sub blob : Local {
my ( $self, $c ) = @_;
- my $git = $c->model('Git');
- my $req = $c->req;
- my $proj = $req->param('p');
- my $filename = $req->param('f') || $req->param('filename');
- my $hash = $req->param('hb') || $git->get_head_hash($proj);
- my $filehash = $req->param('h') || $git->get_hash_by_path($proj, $hash, $filename, 'blob');
-
- my $blob = $git->run_cmd('cat-file' => blob => $filehash);
-
$c->stash(
- blob => $blob,
+ blob => $c->model('GPP')->get_object($c->req->param('h'))->content,
action => 'blob',
);
+
+ $c->forward('View::Syntax');
}
sub reflog : Local {
my ( $self, $c ) = @_;
my @log = $c->model('Git')->reflog(
- # XXX The project parameter should probably be passed into the Model.
- $c->req->param('p'),
'--since=yesterday'
);
);
}
+sub commit : Local {
+ my ( $self, $c ) = @_;
+
+ $c->stash(
+ commit => $c->model('GPP')->get_object($c->req->param('h')),
+ action => 'commit',
+ );
+}
+
sub auto : Private {
my($self, $c) = @_;