summaryrefslogtreecommitdiff
path: root/Documentation/RelNotes/1.5.0.4.txt
diff options
context:
space:
mode:
authorLibravatar Stefan Beller <sbeller@google.com>2018-07-16 16:05:40 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2018-07-17 11:25:31 -0700
commitb3095712f9d81572c3658d579e50db907b72f46d (patch)
tree72c68e3d2d5f55500021cd15254a3ca7e73dd1df /Documentation/RelNotes/1.5.0.4.txt
parentdiff.c: add a blocks mode for moved code detection (diff)
downloadtgif-b3095712f9d81572c3658d579e50db907b72f46d.tar.xz
diff.c: decouple white space treatment from move detection algorithm
In the original implementation of the move detection logic the choice for ignoring white space changes is the same for the move detection as it is for the regular diff. Some cases came up where different treatment would have been nice. Allow the user to specify that white space should be ignored differently during detection of moved lines than during generation of added and removed lines. This is done by providing analogs to the --ignore-space-at-eol, -b, and -w options by introducing the option --color-moved-ws=<modes> with the modes named "ignore-space-at-eol", "ignore-space-change" and "ignore-all-space", which is used only during the move detection phase. As we change the default, we'll adjust the tests. For now we do not infer any options to treat white spaces in the move detection from the generic white space options given to diff. This can be tuned later to reasonable default. As we plan on adding more white space related options in a later patch, that interferes with the current white space options, use a flag field and clamp it down to XDF_WHITESPACE_FLAGS, as that (a) allows to easily check at parse time if we give invalid combinations and (b) can reuse parts of this patch. By having the white space treatment in its own option, we'll also make it easier for a later patch to have an config option for spaces in the move detection. Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/RelNotes/1.5.0.4.txt')
0 files changed, 0 insertions, 0 deletions