]> gitweb.ps.run Git - ps-cgit/commitdiff
In side-by-side diff, add support for marking individual characters.
authorRagnar Ouchterlony <ragnar@lysator.liu.se>
Sun, 25 Oct 2009 17:13:22 +0000 (18:13 +0100)
committerLars Hjemli <hjemli@gmail.com>
Sat, 7 Nov 2009 14:37:11 +0000 (15:37 +0100)
Refuses to do so if the left hand side of the diff has different amount of
differing lines to the right hand side to avoid confusion.

Note that I use the naive dynamic programming approach for calculating the
longest common subsequence. We could probably be more efficient by using a
better algorithm. The LCS calculating function is O(n*m) and uses up n*m
amount of memory too (so if we we compare two strings of length 100, I use
an array of 10000 for calculating the LCS). Might want to not calculate LCS
if the length of the line is too large.

Signed-off-by: Ragnar Ouchterlony <ragnar@lysator.liu.se>

No differences found