This patch turns ref markers for tags and heads into links to
shortlog/refname. Appropriate changes are made in the CSS to prevent ref
markers to be annoyingly blue and underlined.
Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
---
gitweb/gitweb.css | 5 +++++
gitweb/gitweb.perl | 5 ++++-
2 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/gitweb/gitweb.css b/gitweb/gitweb.css
index aa0eeca..2b43eea 100644
--- a/gitweb/gitweb.css
+++ b/gitweb/gitweb.css
@@ -481,6 +481,11 @@ span.refs span {
border-color: #ffccff #ff00ee #ff00ee #ffccff;
}
+span.refs span a {
+ text-decoration: none;
+ color: inherit;
+}
+
span.refs span.ref {
background-color: #aaaaff;
border-color: #ccccff #0033cc #0033cc #ccccff;
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 90cd99b..7f391fa 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -1093,6 +1093,7 @@ sub format_log_line_html {
sub format_ref_marker {
my ($refs, $id) = @_;
my $markers = '';
+ my $htmltext;
if (defined $refs->{$id}) {
foreach my $ref (@{$refs->{$id}}) {
@@ -1101,13 +1102,15 @@ sub format_ref_marker {
if ($ref =~ m!^(.*?)s?/(.*)$!) {
$type = $1;
$name = $2;
+ $htmltext = $cgi->a({-href => href(action=>"shortlog", hash=>$name)}, $name);
} else {
$type = "ref";
$name = $ref;
+ $htmltext = esc_html($name);
}
$markers .= " <span class=\"$type\" title=\"$ref\">" .
- esc_html($name) . "</span>";
+ $htmltext . "</span>";
}
}
--
1.5.6.3
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html| Greg Kroah-Hartman | [PATCH 002/196] Chinese: rephrase English introduction in HOWTO |
| david | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Jan Engelhardt | intel iommu (Re: -mm merge plans for 2.6.23) |
| Andi Kleen | Re: [PATCH] x86: Construct 32 bit boot time page tables in native format. |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| Jarek Poplawski | Re: Possible regression in HTB |
| Natalie Protasevich | [BUG] New Kernel Bugs |
| Jarek Poplawski | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
git: | |
