1
0
Fork 0

Include author and email in commit list

master
Mike Gerwitz 2015-05-22 00:37:03 -04:00
parent 0b31902f19
commit 6c95ba243a
No known key found for this signature in database
GPG Key ID: F22BB8158EE30EAB
4 changed files with 12 additions and 5 deletions

View File

@ -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

View File

@ -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

3
rss
View File

@ -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

View File

@ -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">