diff options
author | Stefan Beller <sbeller@google.com> | 2017-06-30 22:53:09 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-06-30 22:59:42 +0200 |
commit | 86b452e2769e80b220327b1301c7487ad4afa4f4 (patch) | |
tree | 4caae0114a2d59d80a7c8cb12f4dc3e27cd7cc08 /diff.h | |
parent | diff.c: color moved lines differently, plain mode (diff) | |
download | git-86b452e2769e80b220327b1301c7487ad4afa4f4.tar.xz git-86b452e2769e80b220327b1301c7487ad4afa4f4.zip |
diff.c: add dimming to moved line detection
Any lines inside a moved block of code are not interesting. Boundaries
of blocks are only interesting if they are next to another block of moved
code.
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.h | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -192,6 +192,7 @@ struct diff_options { COLOR_MOVED_NO = 0, COLOR_MOVED_PLAIN = 1, COLOR_MOVED_ZEBRA = 2, + COLOR_MOVED_ZEBRA_DIM = 3, } color_moved; #define COLOR_MOVED_DEFAULT COLOR_MOVED_ZEBRA #define COLOR_MOVED_MIN_BLOCK_LENGTH 3 @@ -218,8 +219,12 @@ enum color_diff { DIFF_FUNCINFO = 8, DIFF_FILE_OLD_MOVED = 9, DIFF_FILE_OLD_MOVED_ALT = 10, - DIFF_FILE_NEW_MOVED = 11, - DIFF_FILE_NEW_MOVED_ALT = 12 + DIFF_FILE_OLD_MOVED_DIM = 11, + DIFF_FILE_OLD_MOVED_ALT_DIM = 12, + DIFF_FILE_NEW_MOVED = 13, + DIFF_FILE_NEW_MOVED_ALT = 14, + DIFF_FILE_NEW_MOVED_DIM = 15, + DIFF_FILE_NEW_MOVED_ALT_DIM = 16 }; const char *diff_get_color(int diff_use_color, enum color_diff ix); #define diff_get_color_opt(o, ix) \ |