summaryrefslogtreecommitdiff
path: root/gitweb/INSTALL
diff options
context:
space:
mode:
authorMichał Kiedrowicz <michal.kiedrowicz@gmail.com>2012-04-11 21:18:43 (GMT)
committerJunio C Hamano <gitster@pobox.com>2012-04-11 21:26:02 (GMT)
commit5fb6ddf67afb3d0dc9b1fce64543f20b28a81b4b (patch)
tree1e81d990e80db8764653c33d38ea0371b9a4ccbe /gitweb/INSTALL
parentf4a81026508a48a129bd936aef2c75ac1f1cdd97 (diff)
downloadgit-5fb6ddf67afb3d0dc9b1fce64543f20b28a81b4b.zip
git-5fb6ddf67afb3d0dc9b1fce64543f20b28a81b4b.tar.gz
git-5fb6ddf67afb3d0dc9b1fce64543f20b28a81b4b.tar.bz2
gitweb: Highlight interesting parts of diff
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 commit teaches gitweb to highlight characters that are different between old and new line with a light green/red background. This should work in the similar manner as in Trac or GitHub. The algorithm that compares lines is based on contrib/diff-highlight. Basically, it works by determining common prefix/suffix of corresponding lines and highlightning only the middle part of lines. For more information, see contrib/diff-highlight/README. Combined diffs are not supported but a following commit will change it. Since we need to pass esc_html()'ed or esc_html_hl_regions()'ed lines to format_diff_lines(), so it was taught to accept preformatted lines passed as a reference. Signed-off-by: Michał Kiedrowicz <michal.kiedrowicz@gmail.com> Acked-by: Jakub Narębski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'gitweb/INSTALL')
0 files changed, 0 insertions, 0 deletions