1
0
mirror of git://projects.qi-hardware.com/eda-tools.git synced 2024-09-30 00:35:05 +03:00

schhist/schhist2web: truncate commit entries after 300 characters

This limit includes the entire entry, including the author and the date.
This commit is contained in:
Werner Almesberger 2012-05-11 01:45:07 -03:00
parent 9365a23f7c
commit b7816b9dad

View File

@ -2,8 +2,8 @@
#
# schhist2web - Web-browseable graphical revision history of schematics
#
# Written 2010 by Werner Almesberger
# Copyright 2010 Werner Almesberger
# Written 2010, 2012 by Werner Almesberger
# Copyright 2010, 2012 Werner Almesberger
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -17,6 +17,7 @@ THUMB_OPTS="-w 3 -d 60 -c 0.5,0.5,0.5 -n 1,1,0"
BG_COLOR="f0f0ff"
FNAME_COLOR="#b0f0ff"
SEP_COLOR="#000000"
CUTOFF=300
shrink()
@ -66,7 +67,7 @@ EOF
echo "<PRE>"
( cd "$dir" && git show \
--pretty=format:"%aN <%aE>%n %ad%n%n %s" \
--quiet $next; ) |
--quiet $next; ) | sed '/\(.\{'$CUTOFF'\}\).*/s//\1.../' |
sed 's/&/&amp;/g;s/</\&lt;/g;s/>/\&gt;/g' |
if [ -z "$SCHHIST_COMMIT_TEMPLATE" ]; then
cat