summaryrefslogtreecommitdiff
path: root/Documentation/git-annotate.txt
diff options
context:
space:
mode:
authorLibravatar Michał Kiedrowicz <michal.kiedrowicz@gmail.com>2012-04-11 23:18:44 +0200
committerLibravatar Junio C Hamano <gitster@pobox.com>2012-04-11 14:26:02 -0700
commit51ef7a6e80013c9131c8751fca7c11b0b4bfba85 (patch)
treeaeeca17d955decf2b0b20cbf8741192e378dbe9e /Documentation/git-annotate.txt
parentgitweb: Highlight interesting parts of diff (diff)
downloadtgif-51ef7a6e80013c9131c8751fca7c11b0b4bfba85.tar.xz
gitweb: Refinement highlightning in combined diffs
The highlightning of combined diffs is currently disabled. This is because output from a combined diff is much harder to highlight because it is not obvious which removed and added lines should be compared. Current code requires that the number of added lines is equal to the number of removed lines and only skips first +/- character, treating second +/- as a line content, Thus, it is not possible to simply use existing algorithm unchanged for combined diffs. Let's start with a simple case: only highlight changes that come from one parent, i.e. when every removed line has a corresponding added line for the same parent. This way the highlightning cannot get wrong. For example, following diffs would be highlighted: - removed line for first parent + added line for first parent context line -removed line for second parent +added line for second parent or - removed line for first parent -removed line for second parent + added line for first parent +added line for second parent but following output will not: - removed line for first parent -removed line for second parent +added line for second parent ++added line for both parents In other words, we require that pattern of '-'-es in pre-image matches pattern of '+'-es in post-image. Further changes may introduce more intelligent approach that better handles combined diffs. 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 'Documentation/git-annotate.txt')
0 files changed, 0 insertions, 0 deletions