diff.c: add a blocks mode for moved code detection
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 <avarab@gmail.com> (https://public-inbox.org/git/87o9j0uljo.fsf@evledraar.gmail.com/) Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
ee1df66f7c
commit
51da15eb23
5
diff.h
5
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
|
||||
|
||||
Reference in New Issue
Block a user