Re: [PATCH] diff-highlight: Work for multiline changes too
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Feb 14, 2012, 00:05 UTC
- Message-ID
- <7v8vk6b7pq.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <20120213222702.GA19393@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
> I ended up pulling your changes out into a few distinct commits. That > made it easier for me to review and understand what was going on (and > hopefully ditto for other reviewers, or people who end up bisecting or > reading the log later). I'll post that series in a moment.
This is all nice. As I am lazy and this is a long neglected contrib/ material I didn't even know it existed ;-), I am tempted to apply them directly on top of 'master'.
This shows the first hunk of your "diff-highlight: refactor to prepare for multi-line hunks" like this to me, by the way.
@@ -23,7 +23,7 @@ while (<>) { $window[2] =~ /^$COLOR*\+/ && $window[3] !~ /^$COLOR*\+/) { print shift @window; {- show_pair}(shift @window, shift @window); + show_{hunk}(shift @window, shift @window); } else { print shift @window; Is this intended, or is setting "diff.color.old = red reverse" not supported (without the custom configuration, the leading blank on the old line is not highlighted)?