cgit_tag_link(buf, NULL, "tag-deco", ctx.qry.head, buf);
}
else if (!prefixcmp(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),
sha1_to_hex(commit->object.sha1),
ctx.qry.vpath, 0);
}
+next:
deco = deco->next;
}
}
}
void cgit_print_log(const char *tip, int ofs, int cnt, char *grep, char *pattern,
- char *path, int pager, int commit_graph)
+ char *path, int pager, int commit_graph, int commit_sort)
{
struct rev_info rev;
struct commit *commit;
COLUMN_COLORS_HTML_MAX);
}
+ if (commit_sort == 1) {
+ static const char *date_order_arg = "--date-order";
+ vector_push(&vec, &date_order_arg, 0);
+ } else if (commit_sort == 2) {
+ static const char *topo_order_arg = "--topo-order";
+ vector_push(&vec, &topo_order_arg, 0);
+ }
+
if (path) {
arg = "--";
vector_push(&vec, &arg, 0);