Introduction
Introduction Statistics Contact Development Disclaimer Help
tatom feed: add link, move content order to bottom - stagit - static git page g…
git clone git://src.adamsgaard.dk/stagit
Log
Files
Refs
README
LICENSE
---
commit 8bf328befabb4d95fa7bf8036f6309e4cd26570d
parent 5578784dda58fd79556bdc937e64f179d7ce5ea9
Author: Hiltjo Posthuma <[email protected]>
Date: Tue, 23 Feb 2016 20:44:00 +0100
atom feed: add link, move content order to bottom
NOTE: using relative links violates the Atom specification, but relative
links are convenient aswell.
Diffstat:
M stagit.c | 18 +++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)
---
diff --git a/stagit.c b/stagit.c
t@@ -507,6 +507,16 @@ printcommitatom(FILE *fp, struct commitinfo *ci)
xmlencode(fp, ci->summary, strlen(ci->summary));
fputs("</title>\n", fp);
}
+ fprintf(fp, "<link rel=\"alternate\" type=\"text/html\" href=\"commit/…
+ ci->oid);
+
+ if (ci->author) {
+ fputs("<author><name>", fp);
+ xmlencode(fp, ci->author->name, strlen(ci->author->name));
+ fputs("</name>\n<email>", fp);
+ xmlencode(fp, ci->author->email, strlen(ci->author->email));
+ fputs("</email>\n</author>\n", fp);
+ }
fputs("<content type=\"text\">", fp);
fprintf(fp, "commit %s\n", ci->oid);
t@@ -526,13 +536,7 @@ printcommitatom(FILE *fp, struct commitinfo *ci)
xmlencode(fp, ci->msg, strlen(ci->msg));
}
fputs("\n</content>\n", fp);
- if (ci->author) {
- fputs("<author><name>", fp);
- xmlencode(fp, ci->author->name, strlen(ci->author->name));
- fputs("</name>\n<email>", fp);
- xmlencode(fp, ci->author->email, strlen(ci->author->email));
- fputs("</email>\n</author>\n", fp);
- }
+
fputs("</entry>\n", 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.