- print INDEX "<a href=\"log.html#$c->{LN}\">";
- print INDEX encode_entities ($c->{MESSAGE});
- print INDEX "</a>";
- if (exists $c->{FILE}) {
- print INDEX " in $c->{FILE}";
+ if (defined ($c->{MATCH})) {
+ my $href = $gitweb_url;
+ $href =~ s/\[FILE\]/uri_escape ($c->{FILE})/ge;
+ $href =~ s/\[LINE\]/$c->{LINE}/g;
+ $href =~ s/\[BRANCH\]/uri_escape ($vars{'dist_commit'})/e;
+
+ print INDEX '<a href="', encode_entities ($href), '">';
+ print INDEX encode_entities (substr ($c->{MESSAGE},
+ 0, $c->{MATCH}));
+ print INDEX '</a>';
+ print INDEX encode_entities (substr ($c->{MESSAGE},
+ $c->{MATCH}));
+ } else {
+ print INDEX encode_entities ($c->{MESSAGE});