-rw-r--r-- | ui-log.c | 13 |
1 files changed, 7 insertions, 6 deletions
@@ -30,16 +30,17 @@ void inspect_files(struct diff_filepair *pair) if (ctx.repo->enable_log_linecount) cgit_diff_files(pair->one->sha1, pair->two->sha1, count_lines); } void print_commit(struct commit *commit) { struct commitinfo *info; char *tmp; + int cols = 2; info = cgit_parse_commit(commit); html("<tr><td>"); tmp = fmt("id=%s", sha1_to_hex(commit->object.sha1)); tmp = cgit_pageurl(ctx.repo->url, "commit", tmp); html_link_open(tmp, NULL, NULL); cgit_print_age(commit->date, TM_WEEK * 2, FMT_SHORTDATE); html_link_close(); @@ -61,25 +62,25 @@ void print_commit(struct commit *commit) htmlf("%d", files); if (ctx.repo->enable_log_linecount) { html("</td><td>"); htmlf("-%d/+%d", rem_lines, add_lines); } } html("</td></tr>\n"); if (ctx.qry.showmsg) { - html("<tr class='nohover'><td></td><td><div class='commit-msg'>"); - html_txt(info->msg); - html("</div><br/></td><td></td>"); if (ctx.repo->enable_log_filecount) { - html("<td></td>"); + cols++; if (ctx.repo->enable_log_linecount) - html("<td></td>"); + cols++; } - html("</tr>\n"); + htmlf("<tr class='nohover'><td></td><td colspan='%d'><div class='commit-msg'>", + cols); + html_txt(info->msg); + html("</div><br/></td></tr>\n"); } cgit_free_commitinfo(info); } void cgit_print_log(const char *tip, int ofs, int cnt, char *grep, char *pattern, char *path, int pager) { |