Code

diff-highlight: refactor to prepare for multi-line hunks
authorJeff King <peff@peff.net>
Mon, 13 Feb 2012 22:33:10 +0000 (17:33 -0500)
committerJunio C Hamano <gitster@pobox.com>
Mon, 13 Feb 2012 23:57:06 +0000 (15:57 -0800)
commit6463fd7ed189f4100e1102062f29b969384f1436
tree30191df0aeae55632f7ee4a40b26d7d101207698
parent097128d1bce7194702f336e30c5e228aa8ba774f
diff-highlight: refactor to prepare for multi-line hunks

The current code structure assumes that we will only look at
a pair of lines at any given time, and that the end result
should always be to output that pair. However, we want to
eventually handle multi-line hunks, which will involve
collating pairs of removed/added lines. Let's refactor the
code to return highlighted pairs instead of printing them.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/diff-highlight/diff-highlight