]> git.ipfire.org Git - thirdparty/git.git/blobdiff - diff.h
range-diff: use dim/bold cues to improve dual color mode
[thirdparty/git.git] / diff.h
diff --git a/diff.h b/diff.h
index dedac472ca5959bb5ff17888a54042ac75678631..e1e54256c180a58876e6f6845046d149d0bf5632 100644 (file)
--- a/diff.h
+++ b/diff.h
@@ -94,6 +94,8 @@ struct diff_flags {
        unsigned funccontext:1;
        unsigned default_follow_renames:1;
        unsigned stat_with_summary:1;
+       unsigned suppress_diff_headers:1;
+       unsigned dual_color_diffed_diffs:1;
 };
 
 static inline void diff_flags_or(struct diff_flags *a,
@@ -208,11 +210,16 @@ 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
+
+       /* XDF_WHITESPACE_FLAGS regarding block detection are set at 2, 3, 4 */
+       #define COLOR_MOVED_WS_ALLOW_INDENTATION_CHANGE (1<<5)
+       int color_moved_ws_handling;
 };
 
 void diff_emit_submodule_del(struct diff_options *o, const char *line);
@@ -241,7 +248,13 @@ enum color_diff {
        DIFF_FILE_NEW_MOVED = 13,
        DIFF_FILE_NEW_MOVED_ALT = 14,
        DIFF_FILE_NEW_MOVED_DIM = 15,
-       DIFF_FILE_NEW_MOVED_ALT_DIM = 16
+       DIFF_FILE_NEW_MOVED_ALT_DIM = 16,
+       DIFF_CONTEXT_DIM = 17,
+       DIFF_FILE_OLD_DIM = 18,
+       DIFF_FILE_NEW_DIM = 19,
+       DIFF_CONTEXT_BOLD = 20,
+       DIFF_FILE_OLD_BOLD = 21,
+       DIFF_FILE_NEW_BOLD = 22,
 };
 const char *diff_get_color(int diff_use_color, enum color_diff ix);
 #define diff_get_color_opt(o, ix) \