font-family: monospace;
}
+div.diff a.list {
+ text-decoration: none;
+}
+
+div.diff a.list:hover {
+ text-decoration: underline;
+}
+
+div.diff.to_file a.list,
div.diff.to_file,
div.diff.add {
color: #008800;
}
+div.diff.from_file a.list,
div.diff.from_file,
div.diff.rem {
color: #cc0000;
my $file = $diffinfo->{'from_file'};
$file ||= $diffinfo->{'file'};
- $patch_line =~ s|a/[0-9a-fA-F]{40}|a/$file|g;
- print "<div class=\"diff from_file\">" . esc_html($patch_line) . "</div>\n";
+ $file = $cgi->a({-href => href(action=>"blob", hash_base=>$hash_parent,
+ hash=>$diffinfo->{'from_id'}, file_name=>$file),
+ -class => "list"}, esc_html($file));
+ $patch_line =~ s|a/.*$|a/$file|g;
+ print "<div class=\"diff from_file\">$patch_line</div>\n";
$patch_line = <$fd>;
chomp $patch_line;
#$patch_line =~ m/^+++/;
$file = $diffinfo->{'to_file'};
$file ||= $diffinfo->{'file'};
- $patch_line =~ s|b/[0-9a-fA-F]{40}|b/$file|g;
- print "<div class=\"diff to_file\">" . esc_html($patch_line) . "</div>\n";
+ $file = $cgi->a({-href => href(action=>"blob", hash_base=>$hash,
+ hash=>$diffinfo->{'to_id'}, file_name=>$file),
+ -class => "list"}, esc_html($file));
+ $patch_line =~ s|b/.*|b/$file|g;
+ print "<div class=\"diff to_file\">$patch_line</div>\n";
next LINE;
}