/* Walk the commit DAG and collect number of commits per author per
* timeperiod into a nested string_list collection.
*/
/* Walk the commit DAG and collect number of commits per author per
* timeperiod into a nested string_list collection.
*/
- const char *argv[] = {NULL, ctx->qry.head, NULL, NULL, NULL, NULL};
+ const char *argv[] = {NULL, ctx.qry.head, NULL, NULL, NULL, NULL};
period->dec(tm);
strftime(tmp, sizeof(tmp), "%Y-%m-%d", tm);
argv[2] = xstrdup(fmt("--since=%s", tmp));
period->dec(tm);
strftime(tmp, sizeof(tmp), "%Y-%m-%d", tm);
argv[2] = xstrdup(fmt("--since=%s", tmp));
* for each author is another string_list which is used to calculate the
* number of commits per time-interval.
*/
* for each author is another string_list which is used to calculate the
* number of commits per time-interval.
*/
- if (i > ctx->repo->max_stats) {
- cgit_print_error(fmt("Statistics type disabled: %s",
- period->name));
+ if (i > ctx.repo->max_stats) {
+ cgit_print_error("Statistics type disabled: %s", period->name);
qsort(authors.items, authors.nr, sizeof(struct string_list_item),
cmp_total_commits);
qsort(authors.items, authors.nr, sizeof(struct string_list_item),
cmp_total_commits);
html("<form method='get' action=''>");
cgit_add_hidden_formfields(1, 0, "stats");
html("<table><tr><td colspan='2'/></tr>");
html("<form method='get' action=''>");
cgit_add_hidden_formfields(1, 0, "stats");
html("<table><tr><td colspan='2'/></tr>");
html("<tr><td class='label'>Period:</td>");
html("<td class='ctrl'><select name='period' onchange='this.form.submit();'>");
html("<tr><td class='label'>Period:</td>");
html("<td class='ctrl'><select name='period' onchange='this.form.submit();'>");
html_option(fmt("%c", periods[i].code),
periods[i].name, fmt("%c", period->code));
html("</select></td></tr>");
html_option(fmt("%c", periods[i].code),
periods[i].name, fmt("%c", period->code));
html("</select></td></tr>");