From fe211c7eef6c7d3e39486d6a7484d3b4debff88f Mon Sep 17 00:00:00 2001 From: Lars Hjemli Date: Thu, 25 Oct 2007 10:40:16 +0200 Subject: Add support for config param summary-tags This parameter can be used to specify max number of tags to show on the summary page. If not specified, all tags are printed. Signed-off-by: Lars Hjemli --- ui-summary.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'ui-summary.c') diff --git a/ui-summary.c b/ui-summary.c index 43582da..3d5eda8 100644 --- a/ui-summary.c +++ b/ui-summary.c @@ -162,7 +162,7 @@ static void cgit_print_branches() cgit_print_branch(list.refs[i]); } -static void cgit_print_tags() +static void cgit_print_tags(int maxcount) { struct reflist list; int i; @@ -174,8 +174,12 @@ static void cgit_print_tags() if (list.count == 0) return; qsort(list.refs, list.count, sizeof(*list.refs), cmp_tag_age); + if (!maxcount) + maxcount = list.count; + else if (maxcount > list.count) + maxcount = list.count; print_tag_header(); - for(i=0; i "); cgit_print_branches(); html(" "); - cgit_print_tags(); + cgit_print_tags(cgit_summary_tags); html(""); } -- cgit v1.2.3-59-g8ed1b