]> gitweb.ps.run Git - ps-cgit/blobdiff - ui-commit.c
ui-refs.c: Refactor print_tag()
[ps-cgit] / ui-commit.c
index 536a8e82d5486be05e98f59079ba1c7bfe536d75..8310ce6667ae288baeed9a1ca201367395ada705 100644 (file)
@@ -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,11 @@ void cgit_print_commit(char *hex, const char *prefix)
        }
        info = cgit_parse_commit(commit);
 
-       format_note(NULL, sha1, &notes, PAGE_ENCODING, 0);
+       init_display_notes(NULL);
+       format_display_notes(sha1, &notes, PAGE_ENCODING, 0);
 
        load_ref_decorations(DECORATE_FULL_REFS);
-       
+
        cgit_print_diff_ctrls();
        html("<table summary='commit info' class='commit-info'>\n");
        html("<tr><th>author</th><td>");
@@ -74,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("</td></tr>\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("<tr><td colspan='3'>");