X-Git-Url: https://gitweb.ps.run/ps-cgit/blobdiff_plain/d87bba846d368e560193a1f75de6d66bffe986cf..4b4a62d507adc61e20e75e2748301ef307a6c95f:/ui-commit.c diff --git a/ui-commit.c b/ui-commit.c index 2da9fcf..8310ce6 100644 --- a/ui-commit.c +++ b/ui-commit.c @@ -7,6 +7,7 @@ */ #include "cgit.h" +#include "ui-commit.h" #include "html.h" #include "ui-shared.h" #include "ui-diff.h" @@ -36,10 +37,12 @@ void cgit_print_commit(char *hex, const char *prefix) } info = cgit_parse_commit(commit); - format_note(NULL, sha1, ¬es, PAGE_ENCODING, 0); + init_display_notes(NULL); + format_display_notes(sha1, ¬es, PAGE_ENCODING, 0); load_ref_decorations(DECORATE_FULL_REFS); + cgit_print_diff_ctrls(); html("
| author | "); html_txt(info->author); @@ -64,11 +67,6 @@ void cgit_print_commit(char *hex, const char *prefix) cgit_commit_link(tmp, NULL, NULL, ctx.qry.head, tmp, prefix, 0); html(" ("); cgit_patch_link("patch", NULL, NULL, NULL, tmp, prefix); - html(") ("); - if ((ctx.qry.ssdiff && !ctx.cfg.ssdiff) || (!ctx.qry.ssdiff && ctx.cfg.ssdiff)) - cgit_commit_link("unidiff", NULL, NULL, ctx.qry.head, tmp, prefix, 1); - else - cgit_commit_link("side-by-side diff", NULL, NULL, ctx.qry.head, tmp, prefix, 1); html(") | |
|---|---|---|
| tree | "); tmp = xstrdup(hex); @@ -78,8 +76,9 @@ void cgit_print_commit(char *hex, const char *prefix) html(" /"); cgit_tree_link(prefix, NULL, NULL, ctx.qry.head, tmp, prefix); } + free(tmp); html(" | |
| "); @@ -110,7 +109,7 @@ void cgit_print_commit(char *hex, const char *prefix) html(" | ||