@matheusbsbs / matheus-bagliano / commits / 0ff5ec70c7
Fork 0

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>

Robert Fitzsimons committed Dec 22, 2006 at 19:38 UTC 0ff5ec70c7d4fb5f176da5e05897c316fda82584
1 file changed +2 -1
gitweb/gitweb.perl
+2 -1
@@ -1139,8 +1139,9 @@ sub git_get_last_activity {
1139
1140 $git_dir = "$projectroot/$path";
1141 open($fd, "-|", git_cmd(), 'for-each-ref',
1142 - '--format=%(refname) %(committer)',
1142 + '--format=%(committer)',
1143 '--sort=-committerdate',
1144 + '--count=1',
1145 'refs/heads') or return;
1146 my $most_recent = <$fd>;
1147 close $fd or return;