Skip to content

Commit

Permalink
gitweb: Sort the list of forks on the summary page by age
Browse files Browse the repository at this point in the history
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 <mike@abacus.co.uk>
Signed-off-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
  • Loading branch information
Mike Ralphson authored and Shawn O. Pearce committed Oct 1, 2008
1 parent 6b28da6 commit f04f27e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gitweb/gitweb.perl
Original file line number Diff line number Diff line change
Expand Up @@ -4119,10 +4119,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();
Expand Down

0 comments on commit f04f27e

Please sign in to comment.