]> git.cameronkatri.com Git - cgit.git/blobdiff - ui-commit.c
makefile: auto-detect presence of various Lua, bsd
[cgit.git] / ui-commit.c
index ef85a499e9fb7b98e7613fb69c5147f4fd0a67fe..c48bfe88fb7966c763e36a37d2a654a776e517d3 100644 (file)
@@ -1,6 +1,6 @@
 /* ui-commit.c: generate commit view
  *
- * Copyright (C) 2006 Lars Hjemli
+ * Copyright (C) 2006-2014 cgit Development Team <cgit@lists.zx2c4.com>
  *
  * Licensed under GNU General Public License v2
  *   (see COPYING for full license text)
@@ -44,20 +44,24 @@ void cgit_print_commit(char *hex, const char *prefix)
        cgit_print_diff_ctrls();
        html("<table summary='commit info' class='commit-info'>\n");
        html("<tr><th>author</th><td>");
+       cgit_open_filter(ctx.repo->email_filter, info->author_email, "commit");
        html_txt(info->author);
        if (!ctx.cfg.noplainemail) {
                html(" ");
                html_txt(info->author_email);
        }
+       cgit_close_filter(ctx.repo->email_filter);
        html("</td><td class='right'>");
        cgit_print_date(info->author_date, FMT_LONGDATE, ctx.cfg.local_time);
        html("</td></tr>\n");
        html("<tr><th>committer</th><td>");
+       cgit_open_filter(ctx.repo->email_filter, info->committer_email, "commit");
        html_txt(info->committer);
        if (!ctx.cfg.noplainemail) {
                html(" ");
                html_txt(info->committer_email);
        }
+       cgit_close_filter(ctx.repo->email_filter);
        html("</td><td class='right'>");
        cgit_print_date(info->committer_date, FMT_LONGDATE, ctx.cfg.local_time);
        html("</td></tr>\n");
@@ -107,28 +111,22 @@ void cgit_print_commit(char *hex, const char *prefix)
        }
        html("</table>\n");
        html("<div class='commit-subject'>");
-       if (ctx.repo->commit_filter)
-               cgit_open_filter(ctx.repo->commit_filter);
+       cgit_open_filter(ctx.repo->commit_filter);
        html_txt(info->subject);
-       if (ctx.repo->commit_filter)
-               cgit_close_filter(ctx.repo->commit_filter);
+       cgit_close_filter(ctx.repo->commit_filter);
        show_commit_decorations(commit);
        html("</div>");
        html("<div class='commit-msg'>");
-       if (ctx.repo->commit_filter)
-               cgit_open_filter(ctx.repo->commit_filter);
+       cgit_open_filter(ctx.repo->commit_filter);
        html_txt(info->msg);
-       if (ctx.repo->commit_filter)
-               cgit_close_filter(ctx.repo->commit_filter);
+       cgit_close_filter(ctx.repo->commit_filter);
        html("</div>");
        if (notes.len != 0) {
                html("<div class='notes-header'>Notes</div>");
                html("<div class='notes'>");
-               if (ctx.repo->commit_filter)
-                       cgit_open_filter(ctx.repo->commit_filter);
+               cgit_open_filter(ctx.repo->commit_filter);
                html_txt(notes.buf);
-               if (ctx.repo->commit_filter)
-                       cgit_close_filter(ctx.repo->commit_filter);
+               cgit_close_filter(ctx.repo->commit_filter);
                html("</div>");
                html("<div class='notes-footer'></div>");
        }