+ if (ctx.repo->enable_log_linecount)
+ cgit_diff_files(pair->one->sha1, pair->two->sha1, &old_size,
+ &new_size, &binary, 0, ctx.qry.ignorews,
+ count_lines);
+}
+
+void show_commit_decorations(struct commit *commit)
+{
+ const struct name_decoration *deco;
+ static char buf[1024];
+
+ buf[sizeof(buf) - 1] = 0;
+ deco = get_name_decoration(&commit->object);
+ html("<span class='decoration'>");
+ while (deco) {
+ if (starts_with(deco->name, "refs/heads/")) {
+ strncpy(buf, deco->name + 11, sizeof(buf) - 1);
+ cgit_log_link(buf, NULL, "branch-deco", buf, NULL,
+ ctx.qry.vpath, 0, NULL, NULL,
+ ctx.qry.showmsg);
+ }
+ else if (starts_with(deco->name, "tag: refs/tags/")) {
+ strncpy(buf, deco->name + 15, sizeof(buf) - 1);
+ cgit_tag_link(buf, NULL, "tag-deco", buf);
+ }
+ else if (starts_with(deco->name, "refs/tags/")) {
+ strncpy(buf, deco->name + 10, sizeof(buf) - 1);
+ cgit_tag_link(buf, NULL, "tag-deco", buf);
+ }
+ else if (starts_with(deco->name, "refs/remotes/")) {
+ if (!ctx.repo->enable_remote_branches)
+ goto next;
+ strncpy(buf, deco->name + 13, sizeof(buf) - 1);
+ cgit_log_link(buf, NULL, "remote-deco", NULL,
+ sha1_to_hex(commit->object.sha1),
+ ctx.qry.vpath, 0, NULL, NULL,
+ ctx.qry.showmsg);
+ }
+ else {
+ strncpy(buf, deco->name, sizeof(buf) - 1);
+ cgit_commit_link(buf, NULL, "deco", ctx.qry.head,
+ sha1_to_hex(commit->object.sha1),
+ ctx.qry.vpath);
+ }
+next:
+ deco = deco->next;
+ }
+ html("</span>");