Mike Gerwitz

Activist for User Freedom

aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Gerwitz <mtg@gnu.org>2015-05-22 00:37:03 -0400
committerMike Gerwitz <mtg@gnu.org>2015-05-22 00:37:03 -0400
commit6c95ba243a7dfec393c06415f0747ab9d6d7d2dc (patch)
tree79f0489fb2dfcb28bbd5318cef7284db3248093d
parent0b31902f19eae6e8b02d1965279b1d89f6c59535 (diff)
downloadrepo2html-6c95ba243a7dfec393c06415f0747ab9d6d7d2dc.tar.gz
repo2html-6c95ba243a7dfec393c06415f0747ab9d6d7d2dc.tar.bz2
repo2html-6c95ba243a7dfec393c06415f0747ab9d6d7d2dc.zip
Include author and email in commit list
-rwxr-xr-xgit/list5
-rwxr-xr-xprocessor5
-rwxr-xr-xrss3
-rwxr-xr-xtpl/commit4
4 files changed, 12 insertions, 5 deletions
diff --git a/git/list b/git/list
index 87da07d..65488ac 100755
--- a/git/list
+++ b/git/list
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
#
# Outputs parsable commit list for Git repositories
#
@@ -21,4 +21,5 @@
# #
# add an extra newline to prevent read from getting confused
-git log --first-parent --pretty='format:%H %h %at %f %s' && echo
+t=$'\t'
+git log --first-parent --pretty="format:%H$t%h$t%at$t%f$t%aN$t%aE$t%s" && echo
diff --git a/processor b/processor
index 39c6b44..4b6c470 100755
--- a/processor
+++ b/processor
@@ -60,7 +60,8 @@ do-index()
lasthash=
# generate index
- while read hash commit ts id subject; do
+ local IFS=$'\t'
+ while read hash commit ts id author email subject; do
# ignore commits that begin with ':'
[[ "$subject" == :* ]] && {
echo "Ignoring $commit: $subject" >&2
@@ -103,7 +104,7 @@ do-index()
# convenience), lowercase so as not to be conflict with conventional
# environment variables
export hash commit id subject="$fmtsubject" timestamp="$ts"
- export dategroup month day year
+ export dategroup month day year author email
# invoke template
"$repotype"/commit2html "$commit" | apply-template commit
diff --git a/rss b/rss
index 4ddcfc3..253d16e 100755
--- a/rss
+++ b/rss
@@ -41,7 +41,8 @@ EOH
# output recent commits as entries (assuming no funny business in the output)
-while read hash commit ts id subject; do
+IFS=$'\t'
+while read hash commit ts id author email subject; do
# ignore commits that begin with ':'
[[ "$subject" == :* ]] && {
echo "Ignoring $commit: $subject" >&2
diff --git a/tpl/commit b/tpl/commit
index 48dcc3e..3b5bc71 100755
--- a/tpl/commit
+++ b/tpl/commit
@@ -43,6 +43,10 @@ cat <<EOF
<header>
<h1 class="subject">$subject</h1>
<h2 class="date">$year-$month-$day</h2>
+ <div class="author">
+ $author
+ <a href="mailto:$email" class="email">&lt;$email&gt;</a>
+ </div>
</header>
<div class="content">