-rw-r--r-- | ui-diff.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -159,34 +159,37 @@ static void inspect_filepair(struct diff_filepair *pair) items[files-1].new_size = new_size; items[files-1].binary = binary; if (lines_added + lines_removed > max_changes) max_changes = lines_added + lines_removed; total_adds += lines_added; total_rems += lines_removed; } void cgit_print_diffstat(const unsigned char *old_sha1, const unsigned char *new_sha1, const char *prefix) { int i, save_context = ctx.qry.context; html("<div class='diffstat-header'>"); cgit_diff_link("Diffstat", NULL, NULL, ctx.qry.head, ctx.qry.sha1, ctx.qry.sha2, NULL, 0); - if (prefix) - htmlf(" (limited to '%s')", prefix); + if (prefix) { + html(" (limited to '"); + html_txt(prefix); + html("')"); + } html(" ("); ctx.qry.context = (save_context > 0 ? save_context : 3) << 1; cgit_self_link("more", NULL, NULL, &ctx); html("/"); ctx.qry.context = (save_context > 3 ? save_context : 3) >> 1; cgit_self_link("less", NULL, NULL, &ctx); ctx.qry.context = save_context; html(" context)"); html(" ("); ctx.qry.ignorews = (ctx.qry.ignorews + 1) % 2; cgit_self_link(ctx.qry.ignorews ? "ignore" : "show", NULL, NULL, &ctx); ctx.qry.ignorews = (ctx.qry.ignorews + 1) % 2; html(" whitespace changes)"); html("</div>"); html("<table summary='diffstat' class='diffstat'>"); max_changes = 0; |