From: Kay Sievers Date: Wed, 7 Dec 2005 15:10:01 +0000 (+0100) Subject: more tags X-Git-Tag: v1.4.0~1^2~15 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=edde3735d06e2581647308966a6b7a77d09a1427;p=git.git more tags Signed-off-by: Kay Sievers --- diff --git a/gitweb.cgi b/gitweb.cgi index 9222ca0fe..1f5a409bf 100755 --- a/gitweb.cgi +++ b/gitweb.cgi @@ -1050,7 +1050,7 @@ sub git_summary { if ($i-- > 0) { my $ref = ""; if (defined $refs->{$commit}) { - $ref = " $refs->{$commit}"; + $ref = " " . esc_html($refs->{$commit}) . ""; } print "$co{'age_string'}\n" . "" . esc_html(chop_str($co{'author_name'}, 10)) . "\n" . @@ -1417,6 +1417,11 @@ sub git_tree { close $fd or die_error(undef, "Reading tree failed."); $/ = "\n"; + my $refs = read_info_ref(); + my $ref = ""; + if (defined $refs->{$hash_base}) { + $ref = " " . esc_html($refs->{$hash_base}) . ""; + } git_header_html(); my $base_key = ""; my $base = ""; @@ -1432,7 +1437,7 @@ sub git_tree { "

\n" . "\n"; print "
\n" . - $cgi->a({-href => "$my_uri?" . esc_param("p=$project;a=commit;h=$hash_base"), -class => "title"}, esc_html($co{'title'})) . "\n" . + $cgi->a({-href => "$my_uri?" . esc_param("p=$project;a=commit;h=$hash_base"), -class => "title"}, esc_html($co{'title'}) . $ref) . "\n" . "
\n"; } else { print "
\n"; @@ -1629,7 +1634,7 @@ sub git_log { my $commit = $revlist[$i]; my $ref = ""; if (defined $refs->{$commit}) { - $ref = " $refs->{$commit}"; + $ref = " " . esc_html($refs->{$commit}) . ""; } my %co = git_read_commit($commit); next if !%co; @@ -1695,6 +1700,11 @@ sub git_commit { if ($hash =~ m/^[0-9a-fA-F]{40}$/) { $expires = "+1d"; } + my $refs = read_info_ref(); + my $ref = ""; + if (defined $refs->{$hash}) { + $ref = " " . esc_html($refs->{$hash}) . ""; + } git_header_html(undef, $expires); print "
\n" . $cgi->a({-href => "$my_uri?" . esc_param("p=$project;a=summary")}, "summary") . @@ -1708,7 +1718,7 @@ sub git_commit { "

\n"; if (defined $co{'parent'}) { print "
\n" . - $cgi->a({-href => "$my_uri?" . esc_param("p=$project;a=commitdiff;h=$hash"), -class => "title"}, esc_html($co{'title'})) . "\n" . + $cgi->a({-href => "$my_uri?" . esc_param("p=$project;a=commitdiff;h=$hash"), -class => "title"}, esc_html($co{'title'}) . $ref) . "\n" . "
\n"; } else { print "
\n" . @@ -1932,6 +1942,11 @@ sub git_commitdiff { if ($hash =~ m/^[0-9a-fA-F]{40}$/) { $expires = "+1d"; } + my $refs = read_info_ref(); + my $ref = ""; + if (defined $refs->{$hash}) { + $ref = " " . esc_html($refs->{$hash}) . ""; + } git_header_html(undef, $expires); print "
\n" . $cgi->a({-href => "$my_uri?" . esc_param("p=$project;a=summary")}, "summary") . @@ -1943,7 +1958,7 @@ sub git_commitdiff { print $cgi->a({-href => "$my_uri?" . esc_param("p=$project;a=commitdiff_plain;h=$hash;hp=$hash_parent")}, "plain") . "\n" . "
\n"; print "
\n" . - $cgi->a({-href => "$my_uri?" . esc_param("p=$project;a=commit;h=$hash"), -class => "title"}, esc_html($co{'title'})) . "\n" . + $cgi->a({-href => "$my_uri?" . esc_param("p=$project;a=commit;h=$hash"), -class => "title"}, esc_html($co{'title'}) . $ref) . "\n" . "
\n"; print "
\n"; my $comment = $co{'comment'}; @@ -2101,7 +2116,7 @@ sub git_history { } my $ref = ""; if (defined $refs->{$commit}) { - $ref = " $refs->{$commit}"; + $ref = " " . esc_html($refs->{$commit}) . ""; } if ($alternate) { print "\n"; @@ -2330,7 +2345,7 @@ sub git_shortlog { my $commit = $revlist[$i]; my $ref = ""; if (defined $refs->{$commit}) { - $ref = " $refs->{$commit}"; + $ref = " " . esc_html($refs->{$commit}) . ""; } my %co = git_read_commit($commit); my %ad = date_str($co{'author_epoch'});