From: Petr Baudis <pasky@suse.cz>
To: git@vger.kernel.org
To: git@vger.kernel.org
Cc: Petr Baudis <pasky@suse.cz>, Mike Ralphson <mike@abacus.co.uk>
Subject: [PATCH] gitweb: Sort the list of forks on the summary page by age
Date: Thu, 25 Sep 2008 18:48:48 +0200 [thread overview]
Message-ID: <1222361328-17368-1-git-send-email-pasky@suse.cz> (raw)
In-Reply-To: <1222361317-17275-1-git-send-email-pasky@suse.cz>
From: Petr Baudis <pasky@suse.cz>
From: Mike Ralphson <mike@abacus.co.uk>
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>
---
gitweb/gitweb.perl | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index bd81e14..0f8a564 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -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();
--
tg: (513dad1..) t/forks/sort-by-age (depends on: t/forks/sort-refactor)
prev parent reply other threads:[~2008-09-25 16:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-23 17:10 Gitweb; ordering of fork list on summary page (was Vanilla gitweb vs repo.or.cz) Mike Ralphson
2008-09-25 16:48 ` [PATCH] gitweb: Clean-up sorting of project list Petr Baudis
2008-09-25 16:48 ` Petr Baudis [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1222361328-17368-1-git-send-email-pasky@suse.cz \
--to=pasky@suse.cz \
--cc=git@vger.kernel.org \
--cc=mike@abacus.co.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).