summaryrefslogtreecommitdiff
path: root/gitweb
diff options
context:
space:
mode:
authorRobert Fitzsimons <robfitz@273k.net>2006-12-22 19:38:13 +0000
committerJunio C Hamano <junkio@cox.net>2006-12-22 23:18:15 -0800
commit0ff5ec70c7d4fb5f176da5e05897c316fda82584 (patch)
tree3ebba0fd90a7c5f12f65724c45f1467f8f5e098d /gitweb
parentaaca9675a494fb42e7caa182ecb89c1951cafefa (diff)
downloadgit-0ff5ec70c7d4fb5f176da5e05897c316fda82584.tar.gz
gitweb: optimize git_get_last_activity.
Only return one line of output and we don't need the refname value. Signed-off-by: Robert Fitzsimons <robfitz@273k.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'gitweb')
-rwxr-xr-xgitweb/gitweb.perl3
1 files changed, 2 insertions, 1 deletions
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 80c04b88da..01e3a8adaa 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -1139,8 +1139,9 @@ sub git_get_last_activity {
$git_dir = "$projectroot/$path";
open($fd, "-|", git_cmd(), 'for-each-ref',
- '--format=%(refname) %(committer)',
+ '--format=%(committer)',
'--sort=-committerdate',
+ '--count=1',
'refs/heads') or return;
my $most_recent = <$fd>;
close $fd or return;