daveewart/colordiff — pull request #7 by Lekensteyn (2013-02-09 19:00:39+00:00)
Title: side-by-side diff fixes and early buffer flushing

When using `svn log --diff | colordiff`, the output would only show up when `svn log` terminates (e.g. SIGINT). This is very annoying, so I tried to make it flush earlier. At first I thought that a simple `$| = 1` would do the job, but after looking why that did not work it turned out that `colordiff` first reads the full diff into memory and then starts processing.

This is of course very inefficient, so I converted it to use a buffer for initial format detection (and for preprocessing the special sdiff format) and then read lines one-by-one. The sdiff format was broken for certain input (e.g. CVS) and converted tabs when colordiff incorrectly detects a sdiff format.

The "flush early" changes:
0b31b29 Output a colored diff more often
a3d40ed Start processing data before reading input with diffy
6dc87fe Detect earlier that the format is not sdiff

side-by-side fixes:
54c0e2b Make detect_diff_type accept a single line
bd7ee11 Fix detection for sdiff -l (--left-column) format
653b839 Ignore CVS markers, delayed tab expansion for diffy

misc (a test):
f8c698e Add test for svn log --diff format

The commits have been categorised, but some need to be applied in order I committed them.

Please review and merge, I suggest to add my repo as remote if you are uncomfortable with the "large whitespace/color changes" such as 54c0e2b. (read the commit messages please). All tests passed after each commit.