]> Lady’s Gitweb - Gitweb/commitdiff
gitweb: Sort the list of forks on the summary page by age
authorMike Ralphson <redacted>
Thu, 25 Sep 2008 16:48:48 +0000 (18:48 +0200)
committerLady <redacted>
Mon, 6 Apr 2026 04:07:33 +0000 (00:07 -0400)
The list of forks on the summary page was unsorted, this just makes
them sorted by age, which seems a fair way to decide which forks are
shown before the list size cut-off (15) kicks in.

s/noheader/no_header was just to make it obvious what the parameter
affects, so all the code can be found with one grep.

pb: As suggested by Mike, I have augmented this by an additional patch
that refactors the sorting logic so that it is not tied to printing
the headers.

Signed-off-by: Mike Ralphson <redacted>
Signed-off-by: Petr Baudis <redacted>
Signed-off-by: Shawn O. Pearce <redacted>
gitweb.perl

index 9ded76fe16d97be35257655b52ad157415e2b494da6a39ef84d8ac9f0621ec45..2efd43719c8785b23b96841ed7f997e3363be810f6b8030488cddc913808d705 100755 (executable)
@@ -4120,10 +4120,10 @@ sub git_summary {
 
        if (@forklist) {
                git_print_header_div('forks');
-               git_project_list_body(\@forklist, undef, 0, 15,
+               git_project_list_body(\@forklist, 'age', 0, 15,
                                      $#forklist <= 15 ? undef :
                                      $cgi->a({-href => href(action=>"forks")}, "..."),
-                                     'noheader');
+                                     'no_header');
        }
 
        git_footer_html();
This page took 0.37549 seconds and 4 git commands to generate.