Introduction
Introduction Statistics Contact Development Disclaimer Help
ttruncate message in log, shorter time format - stagit - static git page genera…
git clone git://src.adamsgaard.dk/stagit
Log
Files
Refs
README
LICENSE
---
commit 1d9324a87ea6b0cc3e1252910c4d6b6ae26e6ea4
parent c5c6741b0a7cc41f1f7976c47d7f41320d57508c
Author: Hiltjo Posthuma <[email protected]>
Date: Mon, 7 Dec 2015 23:22:45 +0100
ttruncate message in log, shorter time format
Diffstat:
M urmoms.c | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
---
diff --git a/urmoms.c b/urmoms.c
t@@ -358,6 +358,7 @@ writelog(FILE *fp)
struct commitinfo *ci;
git_revwalk *w = NULL;
git_oid id;
+ size_t len;
int ret = 0;
mkdir("commit", 0755);
t@@ -374,19 +375,23 @@ writelog(FILE *fp)
if (!(ci = commitinfo_getbyoid(&id)))
break;
- fputs("<tr><td>", fp);
+ fputs("<tr><td align=\"right\">", fp);
+ if (ci->author)
+ printtimeshort(fp, &(ci->author->when));
+ fputs("</td><td>", fp);
if (ci->summary) {
fprintf(fp, "<a href=\"%scommit/%s.html\">", relpath, …
- xmlencode(fp, ci->summary, strlen(ci->summary));
+ if ((len = strlen(ci->summary)) > 79) {
+ xmlencode(fp, ci->summary, 76);
+ fputs("...", fp);
+ } else {
+ xmlencode(fp, ci->summary, len);
+ }
fputs("</a>", fp);
}
fputs("</td><td>", fp);
if (ci->author)
xmlencode(fp, ci->author->name, strlen(ci->author->nam…
-
- fputs("</td><td align=\"right\">", fp);
- if (ci->author)
- printtime(fp, &(ci->author->when));
fputs("</td><td align=\"right\">", fp);
fprintf(fp, "%zu", ci->filecount);
fputs("</td><td align=\"right\">", fp);
You are viewing proxied material from mx1.adamsgaard.dk. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.