X-Git-Url: https://git.cameronkatri.com/cgit.git/blobdiff_plain/73e13e2bf7b7e794e6df9ac170452a8991137d08..d62e71a0240a7506b870b99e5c068f336e0a137e:/ui-commit.c?ds=inline diff --git a/ui-commit.c b/ui-commit.c index 536a8e8..ef85a49 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" @@ -26,20 +27,20 @@ void cgit_print_commit(char *hex, const char *prefix) hex = ctx.qry.head; if (get_sha1(hex, sha1)) { - cgit_print_error(fmt("Bad object id: %s", hex)); + cgit_print_error("Bad object id: %s", hex); return; } commit = lookup_commit_reference(sha1); if (!commit) { - cgit_print_error(fmt("Bad commit reference: %s", hex)); + cgit_print_error("Bad commit reference: %s", hex); return; } info = cgit_parse_commit(commit); - format_note(NULL, sha1, ¬es, PAGE_ENCODING, 0); + format_display_notes(sha1, ¬es, PAGE_ENCODING, 0); load_ref_decorations(DECORATE_FULL_REFS); - + cgit_print_diff_ctrls(); html("\n"); html("\n"); - for (p = commit->parents; p ; p = p->next) { + for (p = commit->parents; p; p = p->next) { parent = lookup_commit_reference(p->item->object.sha1); if (!parent) { html("
author"); @@ -74,8 +75,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("
"); @@ -135,7 +137,7 @@ void cgit_print_commit(char *hex, const char *prefix) tmp = sha1_to_hex(commit->parents->item->object.sha1); else tmp = NULL; - cgit_print_diff(ctx.qry.sha1, tmp, prefix, 0); + cgit_print_diff(ctx.qry.sha1, tmp, prefix, 0, 0); } strbuf_release(¬es); cgit_free_commitinfo(info);