gitweb: Parse two-line from-file/to-file diff header in git_patchset_body

Parse two-line from-file/to-file unified diff header in
git_patchset_body directly, instead of leaving pretty-printing to
format_diff_line function.  Hashes as from-file/to-file are replaced
by proper from-file and to-file names (from $diffinfo); in the future
we can put hyperlinks there.  This makes possible to do blobdiff with
only blobs hashes.

The lines in two-line unified diff header have now class "from_file"
and "to_file"; the style is chosen to match previous output (classes
"rem" and "add" because of '-' and '+' as first character of patch
line).

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
Jakub Narebski
2006-08-25 21:04:13 +02:00
committed by Junio C Hamano
parent fe87585e53
commit e4e4f82545
2 changed files with 19 additions and 1 deletions

View File

@ -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;
}