]> Lady’s Gitweb - Gitweb/blobdiff - gitweb.perl
gitweb: optimize git_shortlog_body.
[Gitweb] / gitweb.perl
index a6a6128be3c99939557a659f57249739b285efac4a8d33776d76f2db14b35843..ade2fe6109155275d3589ac5b34028b9968c1edc17762363aea0b079be7ac0f4 100755 (executable)
@@ -2637,6 +2637,8 @@ sub git_shortlog_body {
        # uses global variable $project
        my ($revlist, $from, $to, $refs, $extra) = @_;
 
+       my $have_snapshot = gitweb_have_snapshot();
+
        $from = 0 unless defined $from;
        $to = $#{$revlist} if (!defined $to || $#{$revlist} < $to);
 
@@ -2664,7 +2666,7 @@ sub git_shortlog_body {
                      $cgi->a({-href => href(action=>"commit", hash=>$commit)}, "commit") . " | " .
                      $cgi->a({-href => href(action=>"commitdiff", hash=>$commit)}, "commitdiff") . " | " .
                      $cgi->a({-href => href(action=>"tree", hash=>$commit, hash_base=>$commit)}, "tree");
-               if (gitweb_have_snapshot()) {
+               if ($have_snapshot) {
                        print " | " . $cgi->a({-href => href(action=>"snapshot", hash=>$commit)}, "snapshot");
                }
                print "</td>\n" .
This page took 0.123291 seconds and 4 git commands to generate.