Diff options
authorBryce Kwon <bryce@brycekwon.com>
committerBryce Kwon <bryce@brycekwon.com>
commit
parent
tree
download
Print each person through one helper
The log, refs and tag pages no longer open a filter of their own, so they stop including filter.h.
Diffstat (limited to '')
-rw-r--r--source/ui-refs.c22
1 file changed, 4 insertions, 18 deletions
diff --git a/source/ui-refs.c b/source/ui-refs.c
index 9bf5d2d..69a2cc1 100644
--- a/source/ui-refs.c
+++ b/source/ui-refs.c
@@ -10,7 +10,6 @@
#define USE_THE_REPOSITORY_VARIABLE
#include "cgit.h"
-#include "filter.h"
#include "html.h"
#include "parsing.h"
#include "ui-refs.h"
@@ -188,12 +187,7 @@ static void print_branch(struct refinfo *ref, int columns)
if (ref->object->type == OBJ_COMMIT) {
cgit_commit_link(info->subject, NULL, NULL, name, NULL, NULL);
html("</td><td class='col-author'>");
- // A filter must not be handed a NULL argument.
- cgit_open_filter(
- ctx.repo->email_filter, info->author_email ? info->author_email : "", "refs"
- );
- html_txt(info->author);
- cgit_close_filter(ctx.repo->email_filter);
+ cgit_print_person(info->author, info->author_email, "refs", 0);
htmlf("</td><td%s>", age_colspan(columns));
cgit_print_age(info->committer_date, info->committer_tz, -1);
} else {
@@ -249,18 +243,10 @@ static void print_tag(struct refinfo *ref, int columns)
cgit_object_link(obj, 0);
html("</td><td class='col-author'>");
if (info) {
- if (info->tagger) {
- cgit_open_filter(ctx.repo->email_filter, info->tagger_email, "refs");
- html_txt(info->tagger);
- cgit_close_filter(ctx.repo->email_filter);
- }
+ if (info->tagger)
+ cgit_print_person(info->tagger, info->tagger_email, "refs", 0);
} else if (ref->object->type == OBJ_COMMIT) {
- cgit_open_filter(
- ctx.repo->email_filter, ref->commit->author_email ? ref->commit->author_email : "",
- "refs"
- );
- html_txt(ref->commit->author);
- cgit_close_filter(ctx.repo->email_filter);
+ cgit_print_person(ref->commit->author, ref->commit->author_email, "refs", 0);
}
htmlf("</td><td%s>", age_colspan(columns));
if (info) {