Skip to content

Commit

Permalink
gitweb: optimize git_get_last_activity.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Robert Fitzsimons authored and Junio C Hamano committed Dec 23, 2006
1 parent aaca967 commit 0ff5ec7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion gitweb/gitweb.perl
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 0ff5ec7

Please sign in to comment.