summaryrefslogtreecommitdiffstatshomepage
path: root/ui-ssdiff.c (unfollow)
Commit message (Collapse)AuthorLines
2013-02-01ssdiff: correctly manage tab expansionJulius Plenz-2/+1
Previously, replace_tabs("foo\tbar") would become " foobar". Signed-off-by: Julius Plenz <plenz@cis.fu-berlin.de> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2012-11-15ssdiff: point line links at exact blob by prepending "id="Julius Plenz-2/+2
Previously, the id_str (i.e. the current or diffed-against commit's SHA1 ID) was simply concatenated to the URL. Now, prepend an "id=" string so that the links actually point to the right blobs and thus the exact lines. Signed-off-by: Julius Plenz <plenz@cis.fu-berlin.de> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2012-03-18use correct type for sizeofJamie Couture-1/+1
**L would have worked well too. Depending on the distribution sizeof *L may return 8 instead of 4. **L is preferable, but since we don't expect this datatype to change very often, sizeof int is less subtle and easier to understand. Signed-off-by: Jamie Couture <jamie.couture@gmail.com>
2012-01-08ui-ssdiff.c: correct length check for LCS tableEric Wong-4/+2
Each individual string may be too long for its respective dimension of the LCS table. Signed-off-by: Eric Wong <normalperson@yhbt.net>
2012-01-03ui-ssdiff: move LCS table away from the stackJamie Couture-2/+31
Printing deferred line changes for files containing long lines would cause a segfault. - limit LCS table size: 128x128. - move LCS table to global context: avoid allocating/freeing memory for every deferred line change. Signed-off-by: Jamie Couture <jamie.couture@gmail.com>
2011-02-19ssdiff: anchors for ssdiffBernhard Reutner-Fischer-10/+24
Emit anchors to the respective revisions in side-by-side diff view Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2009-11-07In side-by-side diff, add support for marking individual characters.Ragnar Ouchterlony-25/+120
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>
2009-09-16Fixed side-by-side diff bugs related to binary diff and more.Ragnar Ouchterlony-2/+6
The fixed bugs: * "Binary files differ" did not show up either in unidiff or side-by-side-diff. * Subproject diffs did not work for side-by-side diffs. * The ssdiff link on diff pages did not conserve the path. Signed-off-by: Ragnar Ouchterlony <ragnar@lysator.liu.se> Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2009-09-16Polishing of how the side-by-side diff looks.Ragnar Ouchterlony-12/+18
Aligned all different files, so that all side-by-side tables look the same. Also made sure that the tables take up the whole browser width. Also various changes to the css to make things easier on the eye. Signed-off-by: Ragnar Ouchterlony <ragnar@lysator.liu.se> Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2009-09-16First version of side-by-side diff.Ragnar Ouchterlony-0/+264
This constitutes the first prototype of a side-by-side diff. It is not possible to switch between unidiff and side-by-side diff at all at this stage. Signed-off-by: Ragnar Ouchterlony <ragnar@lysator.liu.se> Signed-off-by: Lars Hjemli <hjemli@gmail.com>