gitweb: optimize git_get_last_activity.
[gitweb.git] / gitweb / gitweb.perl
index 80c04b88da6043baec1c0c5557ec29dd23a45d96..01e3a8adaa0977207965fee9d723bc4a1c817ada 100755 (executable)
@@ -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;