gitweb: Add a feature to show side-by-side diff
commit29e0426c8e5198ae23a73cf4276651528ad6dba6
authorKato Kazuyoshi <kato.kazuyoshi@gmail.com>
Mon, 24 Oct 2011 19:28:54 +0000 (24 21:28 +0200)
committerJakub Narebski <jnareb@gmail.com>
Mon, 24 Oct 2011 19:28:54 +0000 (24 21:28 +0200)
treec6bd30c192c6d9b1e4e2b87382c82069e8a627c6
parentbb02762a7e109804fad775b0043f739d3954bfd1
gitweb: Add a feature to show side-by-side diff

This commits adds to support for showing "side-by-side" style diff.
Currently you have to hand-craft the URL; navigation for selecting
diff style is to be added in the next commit.

The diff output in unified format from "git diff-tree" is reorganized
to side-by-side style chunk by chunk with format_sidebyside_diff_chunk().
This reorganization requires knowledge about diff line classification,
so format_diff_line() was renamed to process_diff_line and changed to
return class of diff line and HTML-formatted )but not wrapped) diff line.
Wrapping is now done by caller, i.e. git_patchset_body().

You can specify style of diff with "ds" ('diff_style') query
parameter.  Currently supported values are 'inline' and 'sidebyside';
the default is 'inline'.

Another solution would be to use "opt" ('extra_options') for that.

Signed-off-by: Kato Kazuyoshi <kato.kazuyoshi@gmail.com>
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
gitweb/gitweb.perl
gitweb/static/gitweb.css