Make the output of UnifiedDiffFormatter match diff -u
authorOri Livneh <ori@wikimedia.org>
Tue, 26 May 2015 01:35:59 +0000 (03:35 +0200)
committerOri Livneh <ori@wikimedia.org>
Tue, 26 May 2015 01:35:59 +0000 (03:35 +0200)
commit066fcb80a1e7be8cf8d356dec47a9976d636b2c7
tree2ace5e060421d10baa0e71ba275a91440a9e3ae0
parentd6b4d3c537fa5944c2f234213b20037fe3192d62
Make the output of UnifiedDiffFormatter match diff -u

GNU 'diff -u' prefixes each line with either a space, a '+', or a '-'.
UnifiedDiffFormatter does the same, but it also adds an additional column of
whitespace between the prefix and the line. GNU diff only does that in
non-unified mode.

Fix this by implementing lines() in UnifiedDiffFormatter, overriding the parent
class implementation.

Bug: T100069
Change-Id: I1bf1b8e6d1d5aceb2c3836548f492f7edebe5a12
includes/diff/UnifiedDiffFormatter.php