diff --git a/gitweb/gitweb.css b/gitweb/gitweb.css index 5eaa24fd24..0912361ac8 100644 --- a/gitweb/gitweb.css +++ b/gitweb/gitweb.css @@ -273,10 +273,12 @@ td.mode { font-family: monospace; } +div.diff.to_file, div.diff.add { color: #008800; } +div.diff.from_file, div.diff.rem { color: #cc0000; } diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index 56a47ab633..b2159bb820 100755 --- a/gitweb/gitweb.perl +++ b/gitweb/gitweb.perl @@ -1706,8 +1706,24 @@ sub git_patchset_body { if ($in_header && $patch_line =~ m/^---/) { - #print "\n" + #print "\n"; # class="diff extended_header" $in_header = 0; + + my $file = $diffinfo->{'from_file'}; + $file ||= $diffinfo->{'file'}; + $patch_line =~ s|a/[0-9a-fA-F]{40}|a/$file|g; + print "