diff options
Diffstat (limited to 'ui-refs.c')
-rw-r--r-- | ui-refs.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -197,10 +197,9 @@ void cgit_print_branches(int maxcount) | |||
197 | if (maxcount == 0 || maxcount > list.count) | 197 | if (maxcount == 0 || maxcount > list.count) |
198 | maxcount = list.count; | 198 | maxcount = list.count; |
199 | 199 | ||
200 | if (maxcount < list.count) { | 200 | qsort(list.refs, list.count, sizeof(*list.refs), cmp_branch_age); |
201 | qsort(list.refs, list.count, sizeof(*list.refs), cmp_branch_age); | 201 | if (ctx.repo->branch_sort == 0) |
202 | qsort(list.refs, maxcount, sizeof(*list.refs), cmp_ref_name); | 202 | qsort(list.refs, maxcount, sizeof(*list.refs), cmp_ref_name); |
203 | } | ||
204 | 203 | ||
205 | for (i = 0; i < maxcount; i++) | 204 | for (i = 0; i < maxcount; i++) |
206 | print_branch(list.refs[i]); | 205 | print_branch(list.refs[i]); |