aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xgorillanest3
-rw-r--r--template/index.tt2
-rw-r--r--template/repository.tt1
3 files changed, 5 insertions, 1 deletions
diff --git a/gorillanest b/gorillanest
index cd294cb..9356c4d 100755
--- a/gorillanest
+++ b/gorillanest
@@ -11,6 +11,7 @@ use Sys::Syslog;
use Template;
use URI::Escape;
+use Data::Dumper;
sub info {
syslog("info", join(' ', @_));
}
@@ -53,6 +54,8 @@ sub GN::user { # /$username/
sub GN::repository { # /$username/$repository
my ($root, $dataref) = @_;
my %data = %$dataref;
+ $data{log} = Dumper(split(/\n/, qx(git log --pretty=format:\'%H | %an | %ad | %s%x0a\'))); # It technically works # | tac | tr -s \'\n\'
+ $data{found} = 1;
return \%data;
}
diff --git a/template/index.tt b/template/index.tt
index a2048a7..908e25d 100644
--- a/template/index.tt
+++ b/template/index.tt
@@ -5,7 +5,7 @@
<body>
<h1>[% title %]</h1>
<h2>[% description %]</h2>
-<ul>[% FOR i IN directories %]<li><a href="/[% i %]/">/[% i %]</a></li>[% END %]</ul>
+<ul>[% FOR i IN log %]<li><a href="/[% i %]/">/[% i %]</a></li>[% END %]</ul>
</body>
[% INCLUDE foot.tt %]
</html>
diff --git a/template/repository.tt b/template/repository.tt
index 2877fa3..f11849a 100644
--- a/template/repository.tt
+++ b/template/repository.tt
@@ -3,6 +3,7 @@
[% INCLUDE head.tt %]
<body>
<h1>[% title %]</h1>
+ <ul>[% FOR i IN log %]<li>[% i %]</li>[% END %]</ul>
<p> Eventually this page will have something on it, RIGHT?!</p>
</body>
[% INCLUDE foot.tt %]