]> git.ipfire.org Git - thirdparty/git.git/commit - diff.c
diff.c: color moved lines differently, plain mode
authorStefan Beller <sbeller@google.com>
Fri, 30 Jun 2017 20:53:08 +0000 (13:53 -0700)
committerJunio C Hamano <gitster@pobox.com>
Fri, 30 Jun 2017 20:59:42 +0000 (13:59 -0700)
commit176841f0c9b470b008c95eb50b7bb9424321d540
treea20f44a2ca31e686ff27ff91221df20226fc9998
parent2e2d5ac184de8facde4e14cec8b4e2a154480ed8
diff.c: color moved lines differently, plain mode

Add the 'plain' mode for move detection of code. This omits the checking
for adjacent blocks, so it is not as useful. If you have a lot of the
same blocks moved in the same patch, the 'Zebra' would end up slow as it
is O(n^2) (n is number of same blocks). So this may be useful there and
is generally easy to add. Instead be very literal at the move detection,
do not skip over short blocks here.

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
diff.c
diff.h
t/t4015-diff-whitespace.sh