diff options
author | Robert Fitzsimons <robfitz@273k.net> | 2006-12-22 19:38:15 +0000 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-12-22 23:18:18 -0800 |
commit | a979d1289be6a3999d7e89bf0359ebf28075fc6b (patch) | |
tree | 1bc8b0c5caf691e9803b9acb3e641460310f9793 /gitweb | |
parent | 3fcf06be5d02de15992d11482cfae82dc058261b (diff) | |
download | git-a979d1289be6a3999d7e89bf0359ebf28075fc6b.tar.gz git-a979d1289be6a3999d7e89bf0359ebf28075fc6b.tar.xz |
gitweb: optimize git_summary.
We don't need to call git_get_head_hash at all just pass in "HEAD" and
use the return id field.
Signed-off-by: Robert Fitzsimons <robfitz@273k.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'gitweb')
-rwxr-xr-x | gitweb/gitweb.perl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index d2ddac8bf..b0e6fdfb9 100755 --- a/gitweb/gitweb.perl +++ b/gitweb/gitweb.perl @@ -2911,9 +2911,9 @@ sub git_project_index { sub git_summary { my $descr = git_get_project_description($project) || "none"; - my $head = git_get_head_hash($project); - my %co = parse_commit($head); + my %co = parse_commit("HEAD"); my %cd = parse_date($co{'committer_epoch'}, $co{'committer_tz'}); + my $head = $co{'id'}; my $owner = git_get_project_owner($project); @@ -2960,7 +2960,7 @@ sub git_summary { # we need to request one more than 16 (0..15) to check if # those 16 are all open my $fd, "-|", git_cmd(), "rev-list", "--max-count=17", - git_get_head_hash($project), "--" + $head, "--" or die_error(undef, "Open git-rev-list failed"); my @revlist = map { chomp; $_ } <$fd>; close $fd; |