Include author and email in commit list
parent
0b31902f19
commit
6c95ba243a
5
git/list
5
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
|
||||
|
|
|
@ -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
3
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
|
||||
|
|
|
@ -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"><$email></a>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<div class="content">
|
||||
|
|
Loading…
Reference in New Issue