Added a simple-to-the-point-of-useless reflog action (there's a plan afoot).
broquaint [Fri, 18 Sep 2009 16:52:20 +0000 (17:52 +0100)]
lib/Gitalist/Controller/Root.pm
templates/reflog.tt2 [new file with mode: 0644]

index b32117f..bbe4ceb 100644 (file)
@@ -89,6 +89,18 @@ sub blob : Local {
   );
 }
 
+sub reflog : Local {
+  my ( $self, $c ) = @_;
+
+  my $log = $c->model('Git')->run_cmd_in($c->req->param('p'),
+      log => '--since=yesterday', '-g'
+  );
+  $c->stash(
+      log    => [map encode_entities($_), $log =~ /(^commit.*?^    \S.*?$)/msg],
+      action => 'reflog',
+  );
+}
+
 sub auto : Private {
     my($self, $c) = @_;
 
diff --git a/templates/reflog.tt2 b/templates/reflog.tt2
new file mode 100644 (file)
index 0000000..a8f4db8
--- /dev/null
@@ -0,0 +1,5 @@
+<ul>
+[% FOR entry IN log %]
+  <li><pre>[% entry %]</pre></li>
+[% END %]
+</ul>