From 39c2e224d3c55dfa1a7668399897be295be07dc7 Mon Sep 17 00:00:00 2001 From: Jeff Smith Date: Thu, 29 Jul 2010 09:32:31 -0500 Subject: ui-log: Display git notes when present Signed-off-by: Jeff Smith Signed-off-by: Lars Hjemli --- cgit.css | 11 +++++++++++ ui-log.c | 12 ++++++++++++ 2 files changed, 23 insertions(+) diff --git a/cgit.css b/cgit.css index 3675697..0c88b65 100644 --- a/cgit.css +++ b/cgit.css @@ -164,6 +164,17 @@ table.list td.logmsg { padding: 1em 0.5em 2em 0.5em; } +table.list td.lognotes-label { + text-align:right; + vertical-align:top; +} + +table.list td.lognotes { + font-family: monospace; + white-space: pre; + padding: 0em 0.5em 2em 0.5em; +} + table.list td a { color: black; } diff --git a/ui-log.c b/ui-log.c index ee93653..7f38d2a 100644 --- a/ui-log.c +++ b/ui-log.c @@ -111,6 +111,9 @@ void print_commit(struct commit *commit) } html("\n"); if (ctx.qry.showmsg) { + struct strbuf notes = STRBUF_INIT; + get_commit_notes(commit, ¬es, PAGE_ENCODING, 0); + if (ctx.repo->enable_log_filecount) { cols++; if (ctx.repo->enable_log_linecount) @@ -120,6 +123,15 @@ void print_commit(struct commit *commit) cols); html_txt(info->msg); html("\n"); + if (notes.len != 0) { + html(""); + html("Notes:"); + htmlf("", + cols); + html_txt(notes.buf); + html("\n"); + } + strbuf_release(¬es); } cgit_free_commitinfo(info); } -- cgit v1.2.3-70-g09d2