Reading diff output is sometimes very hard, even if it's colored, especially if lines differ only in few characters. This is often true when a commit fixes a typo or renames some variables or functions. This patch series teaches gitweb to highlight fragments that are different between old and new line. This should mimic the same feature in Trac or GitHub. To achieve that, added and removed lines must be accumulated and compared. The current code in print_sidebyside_diff_chunk() already does this, so this patch series reuses it in commits: gitweb: Extract print_sidebyside_diff_lines() gitweb: Use print_diff_chunk() for both side-by-side and inline diffs Next, HTML-formatting diff lines is pushed down to the place where they are about to be printed. This is required because comparision must be performened on raw git-diff output and not on HTML-formatted lines. This is done in commits: gitweb: Move HTML-formatting diff line back to process_diff_line() gitweb: Push formatting diff lines to print_diff_chunk() gitweb: Format diff lines just before printing The last three commits implement the advertised feature. They could be squashed together but that would make them harder to review (I think). gitweb: Highlight interesting parts of diff gitweb: Use different colors to present marked changes gitweb: Highlight combined diffs This series is based on v1.7.9. Michał Kiedrowicz (8): gitweb: Extract print_sidebyside_diff_lines() gitweb: Use print_diff_chunk() for both side-by-side and inline diffs gitweb: Move HTML-formatting diff line back to process_diff_line() gitweb: Push formatting diff lines to print_diff_chunk() gitweb: Format diff lines just before printing gitweb: Highlight interesting parts of diff gitweb: Use different colors to present marked changes gitweb: Highlight combined diffs gitweb/gitweb.perl | 304 +++++++++++++++++++++++++++++++++++----------- gitweb/static/gitweb.css | 8 ++ 2 files changed, 238 insertions(+), 74 deletions(-) -- 1.7.3.4 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html