From 51da15eb2301667c6ac01dd18851b7a424fbf2b1 Mon Sep 17 00:00:00 2001 From: Stefan Beller Date: Mon, 16 Jul 2018 16:05:39 -0700 Subject: diff.c: add a blocks mode for moved code detection MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The new "blocks" mode provides a middle ground between plain and zebra. It is as intuitive (few colors) as plain, but still has the requirement for a minimum of lines/characters to count a block as moved. Suggested-by: Ævar Arnfjörð Bjarmason (https://public-inbox.org/git/87o9j0uljo.fsf@evledraar.gmail.com/) Signed-off-by: Stefan Beller Signed-off-by: Junio C Hamano --- diff.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'diff.h') diff --git a/diff.h b/diff.h index d29560f822..7bd4f182c3 100644 --- a/diff.h +++ b/diff.h @@ -208,8 +208,9 @@ struct diff_options { enum { COLOR_MOVED_NO = 0, COLOR_MOVED_PLAIN = 1, - COLOR_MOVED_ZEBRA = 2, - COLOR_MOVED_ZEBRA_DIM = 3, + COLOR_MOVED_BLOCKS = 2, + COLOR_MOVED_ZEBRA = 3, + COLOR_MOVED_ZEBRA_DIM = 4, } color_moved; #define COLOR_MOVED_DEFAULT COLOR_MOVED_ZEBRA #define COLOR_MOVED_MIN_ALNUM_COUNT 20 -- cgit v1.3