... | ... |
@@ -808,8 +808,11 @@ sub references { |
808 | 808 |
while (my $line = $self->_dec(scalar <$fh>)) { |
809 | 809 |
chomp $line; |
810 | 810 |
if ($line =~ m!^([0-9a-fA-F]{40})\srefs/$type_re/(.*)$!) { |
811 |
- if (defined $refs{$1}) { push @{$refs{$1}}, $2 } |
|
812 |
- else { $refs{$1} = [$2] } |
|
811 |
+ my $rev = $1; |
|
812 |
+ my $ref = $2; |
|
813 |
+ $ref =~ s/\^\{\}//; |
|
814 |
+ if (defined $refs{$rev}) { push @{$refs{$rev}}, $ref } |
|
815 |
+ else { $refs{$rev} = [$ref] } |
|
813 | 816 |
} |
814 | 817 |
} |
815 | 818 |
close $fh or return; |
... | ... |
@@ -77,7 +77,7 @@ |
77 | 77 |
</div> |
78 | 78 |
</div> |
79 | 79 |
% if (@{$commit->{comment}} > 1) { |
80 |
- <div class="border-bottom-gray" style="padding-left:15px;padding-bottom:5px"> |
|
80 |
+ <div style="padding-left:15px;padding-bottom:5px"> |
|
81 | 81 |
% for (my $i = 1; $i < @{$commit->{comment}}; $i++) { |
82 | 82 |
<div> |
83 | 83 |
<%= $commit->{comment}[$i] %> |
... | ... |
@@ -86,16 +86,17 @@ |
86 | 86 |
</div> |
87 | 87 |
% } |
88 | 88 |
% if (@$branches || @$tags) { |
89 |
+ <hr class="border-gray" style="border-bottom:none;margin-top:5px;margin-bottom:0px"> |
|
89 | 90 |
<div class="broder-top-gray" style="padding-top:7px"> |
90 | 91 |
% for my $branch (@$branches) { |
91 |
- <span style="padding-left:5px"> |
|
92 |
- <i class="icon-share-alt"></i><a href="<%= url_for("/$user/$project/commit/$branch") %>"><%= $branch %></a> |
|
92 |
+ <span style="padding-left:5px;"> |
|
93 |
+ <i class="icon-share-alt" style="padding-right:1px"></i><a href="<%= url_for("/$user/$project/tree/$branch") %>"><%= $branch %></a> |
|
93 | 94 |
</span> |
94 | 95 |
% } |
95 | 96 |
|
96 | 97 |
% for my $tag (@$tags) { |
97 | 98 |
<span style="padding-left:5px"> |
98 |
- <i class="icon-tag"></i><a href="<%= url_for("/$user/$project/commit/$tag") %>"><%= $tag %></a> |
|
99 |
+ <i class="icon-tag" style="padding-right:2px"></i><a href="<%= url_for("/$user/$project/tree/$tag") %>"><%= $tag %></a> |
|
99 | 100 |
</span> |
100 | 101 |
% } |
101 | 102 |
</div> |
... | ... |
@@ -161,6 +161,13 @@ note 'Commit page'; |
161 | 161 |
$t->content_like(qr#refs/heads/b1#); |
162 | 162 |
} |
163 | 163 |
|
164 |
+ note 'Branch and tag refernce'; |
|
165 |
+ { |
|
166 |
+ $t->get_ok("/$user/$project/commit/6d71d9bc1ee3bd1c96a559109244c1fe745045de"); |
|
167 |
+ $t->content_like(qr/b2/); |
|
168 |
+ $t->content_like(qr/t21/); |
|
169 |
+ $t->content_unlike(qr/t21\^\{\}/); |
|
170 |
+ } |
|
164 | 171 |
|
165 | 172 |
} |
166 | 173 |
|