diff options
author | Stefan Beller <sbeller@google.com> | 2018-07-17 02:05:39 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-07-17 21:25:31 +0300 |
commit | 51da15eb2301667c6ac01dd18851b7a424fbf2b1 (patch) | |
tree | 4d19e188779d5d495f04bdfa80bfa4a41052c59c /Documentation/diff-options.txt | |
parent | ee1df66f7cfd0f37bb0e235c4f7ef12bd09a8d2d (diff) |
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>
Diffstat (limited to 'Documentation/diff-options.txt')
-rw-r--r-- | Documentation/diff-options.txt | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt index e3a44f03cd..ba56169de3 100644 --- a/Documentation/diff-options.txt +++ b/Documentation/diff-options.txt @@ -276,10 +276,14 @@ plain:: that are added somewhere else in the diff. This mode picks up any moved line, but it is not very useful in a review to determine if a block of code was moved without permutation. -zebra:: +blocks:: Blocks of moved text of at least 20 alphanumeric characters are detected greedily. The detected blocks are - painted using either the 'color.diff.{old,new}Moved' color or + painted using either the 'color.diff.{old,new}Moved' color. + Adjacent blocks cannot be told apart. +zebra:: + Blocks of moved text are detected as in 'blocks' mode. The blocks + are painted using either the 'color.diff.{old,new}Moved' color or 'color.diff.{old,new}MovedAlternative'. The change between the two colors indicates that a new block was detected. dimmed_zebra:: |