The blob action now has simple (but functioning) syntax highlighting (thanks to jrock...
[catagits/Gitalist.git] / lib / Gitalist / Controller / Root.pm
index 04ceabf..7f54f8c 100644 (file)
@@ -78,6 +78,8 @@ sub blob : Local {
       blob   => $c->model('GPP')->get_object($c->req->param('h'))->content,
       action => 'blob',
   );
+
+  $c->forward('View::Syntax');
 }
 
 sub reflog : Local {
@@ -93,19 +95,18 @@ sub reflog : Local {
   );
 }
 
-sub commit {
+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) = @_;
 
-    # XXX Probably not the best place for it but it will do for now.
-    if(my $proj = $c->req->param('p')) {
-        my $m = $c->model('Git');
-        $m->project($proj);
-    }
-
     # Yes, this is hideous.
     $self->header($c);
     $self->footer($c);