/* ui-commit.c: generate commit view
*
- * Copyright (C) 2006 Lars Hjemli
+ * Copyright (C) 2006-2014 cgit Development Team <cgit@lists.zx2c4.com>
*
* Licensed under GNU General Public License v2
* (see COPYING for full license text)
*/
#include "cgit.h"
+#include "ui-commit.h"
#include "html.h"
#include "ui-shared.h"
#include "ui-diff.h"
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);
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);