summaryrefslogtreecommitdiff
path: root/diff.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-08-02 15:30:40 -0700
committerJunio C Hamano <gitster@pobox.com>2018-08-02 15:30:40 -0700
commita81575aa91a015535374bb5b1e0e6dc2a81c74ab (patch)
treeb7bd20fdd2a3fa1401142017291591cb60cbd148 /diff.h
parent7a135475d327f4f4f7f1b4892f69ba7b6ee88e27 (diff)
parent626c0b5d395196ddabcf9b9a430db385722689d4 (diff)
downloadgit-a81575aa91a015535374bb5b1e0e6dc2a81c74ab.tar.gz
Merge branch 'sb/diff-color-move-more'
"git diff --color-moved" feature has further been tweaked. * sb/diff-color-move-more: diff.c: offer config option to control ws handling in move detection diff.c: add white space mode to move detection that allows indent changes diff.c: factor advance_or_nullify out of mark_color_as_moved diff.c: decouple white space treatment from move detection algorithm diff.c: add a blocks mode for moved code detection diff.c: adjust hash function signature to match hashmap expectation diff.c: do not pass diff options as keydata to hashmap t4015: avoid git as a pipe input xdiff/xdiffi.c: remove unneeded function declarations xdiff/xdiff.h: remove unused flags
Diffstat (limited to 'diff.h')
-rw-r--r--diff.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/diff.h b/diff.h
index dedac472ca..a14895bb82 100644
--- a/diff.h
+++ b/diff.h
@@ -208,11 +208,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);