atom feed: use published for author commit date, updated for committer date
this is the same as cgit.
1 files changed, 8 insertions(+), 1 deletions(-) | |||
---|---|---|---|
M | stagit.c | +8 | -1 |
1@@ -29,6 +29,7 @@ struct commitinfo {
2 char parentoid[GIT_OID_HEXSZ + 1];
3
4 const git_signature *author;
5+ const git_signature *committer;
6 const char *summary;
7 const char *msg;
8
9@@ -169,6 +170,7 @@ commitinfo_getbyoid(const git_oid *id)
10 git_oid_tostr(ci->parentoid, sizeof(ci->parentoid), git_commit_parent_id(ci->commit, 0));
11
12 ci->author = git_commit_author(ci->commit);
13+ ci->committer = git_commit_committer(ci->commit);
14 ci->summary = git_commit_summary(ci->commit);
15 ci->msg = git_commit_message(ci->commit);
16
17@@ -613,8 +615,13 @@ printcommitatom(FILE *fp, struct commitinfo *ci)
18
19 fprintf(fp, "<id>%s</id>\n", ci->oid);
20 if (ci->author) {
21- fputs("<updated>", fp);
22+ fputs("<published>", fp);
23 printtimez(fp, &(ci->author->when));
24+ fputs("</published>\n", fp);
25+ }
26+ if (ci->committer) {
27+ fputs("<updated>", fp);
28+ printtimez(fp, &(ci->committer->when));
29 fputs("</updated>\n", fp);
30 }
31 if (ci->summary) {