]> Lady’s Gitweb - Gitweb/commitdiff
gitweb: optimize git_get_last_activity.
authorRobert Fitzsimons <redacted>
Fri, 22 Dec 2006 19:38:13 +0000 (19:38 +0000)
committerLady <redacted>
Mon, 6 Apr 2026 04:07:11 +0000 (00:07 -0400)
Only return one line of output and we don't need the refname value.

Signed-off-by: Robert Fitzsimons <redacted>
Signed-off-by: Junio C Hamano <redacted>
gitweb.perl

index 253cfe8defaa6f6c86a7cea4e8def2d5aa688ce17123104a08bb7592a97e9fcf..a6a6128be3c99939557a659f57249739b285efac4a8d33776d76f2db14b35843 100755 (executable)
@@ -1140,8 +1140,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;
This page took 0.320228 seconds and 4 git commands to generate.