Added first cut of /shortlog action and simplified the parse_rev_list() method.
[catagits/Gitalist.git] / lib / Gitalist / Controller / Root.pm
index 06c0a8e..7fac165 100644 (file)
@@ -129,7 +129,7 @@ sub reflog : Local {
 
 =head2 commit
 
-Exposes a given commit. Probably too simple currently.
+Exposes a given commit.
 
 =cut
 
@@ -142,6 +142,21 @@ sub commit : Local {
   );
 }
 
+=head2 shortlog
+
+Expose an abbreviated log of a given sha1.
+
+=cut
+
+sub shortlog : Local {
+  my ( $self, $c ) = @_;
+
+  $c->stash(
+      commit => $c->model('Git')->get_object($c->req->param('h')),
+      action => 'shortlog',
+  );
+}
+
 =head2 auto
 
 Populate the header and footer. Perhaps not the best location.