summaryrefslogtreecommitdiff
path: root/diff.h
diff options
context:
space:
mode:
authorLibravatar Stefan Beller <sbeller@google.com>2017-06-30 13:53:08 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2017-06-30 13:59:42 -0700
commit176841f0c9b470b008c95eb50b7bb9424321d540 (patch)
treea20f44a2ca31e686ff27ff91221df20226fc9998 /diff.h
parentdiff.c: color moved lines differently (diff)
downloadtgif-176841f0c9b470b008c95eb50b7bb9424321d540.tar.xz
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>
Diffstat (limited to 'diff.h')
-rw-r--r--diff.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/diff.h b/diff.h
index 3196802673..4cfd609c54 100644
--- a/diff.h
+++ b/diff.h
@@ -190,6 +190,7 @@ struct diff_options {
struct emitted_diff_symbols *emitted_symbols;
enum {
COLOR_MOVED_NO = 0,
+ COLOR_MOVED_PLAIN = 1,
COLOR_MOVED_ZEBRA = 2,
} color_moved;
#define COLOR_MOVED_DEFAULT COLOR_MOVED_ZEBRA