summaryrefslogtreecommitdiff
path: root/diff.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-11-27 02:06:31 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-11-27 02:06:31 (GMT)
commit10f65c239a885336b745cc9d2e1654980ffef41e (patch)
treef10ffd064f85e27f3ff8b64e0d26e179df8bca77 /diff.c
parent14c63a9dc093d6738454f6369a4f5663ca732cf7 (diff)
parente9282f02b2f21118f3383608718e38efc3d967e1 (diff)
downloadgit-10f65c239a885336b745cc9d2e1654980ffef41e.zip
git-10f65c239a885336b745cc9d2e1654980ffef41e.tar.gz
git-10f65c239a885336b745cc9d2e1654980ffef41e.tar.bz2
Merge branch 'jc/ignore-cr-at-eol'
The "diff" family of commands learned to ignore differences in carriage return at the end of line. * jc/ignore-cr-at-eol: diff: --ignore-cr-at-eol xdiff: reassign xpparm_t.flags bits
Diffstat (limited to 'diff.c')
-rw-r--r--diff.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/diff.c b/diff.c
index 0763e89..2ebe222 100644
--- a/diff.c
+++ b/diff.c
@@ -4129,9 +4129,7 @@ void diff_setup_done(struct diff_options *options)
* inside contents.
*/
- if (DIFF_XDL_TST(options, IGNORE_WHITESPACE) ||
- DIFF_XDL_TST(options, IGNORE_WHITESPACE_CHANGE) ||
- DIFF_XDL_TST(options, IGNORE_WHITESPACE_AT_EOL))
+ if ((options->xdl_opts & XDF_WHITESPACE_FLAGS))
options->flags.diff_from_contents = 1;
else
options->flags.diff_from_contents = 0;
@@ -4588,6 +4586,8 @@ int diff_opt_parse(struct diff_options *options,
DIFF_XDL_SET(options, IGNORE_WHITESPACE_CHANGE);
else if (!strcmp(arg, "--ignore-space-at-eol"))
DIFF_XDL_SET(options, IGNORE_WHITESPACE_AT_EOL);
+ else if (!strcmp(arg, "--ignore-cr-at-eol"))
+ DIFF_XDL_SET(options, IGNORE_CR_AT_EOL);
else if (!strcmp(arg, "--ignore-blank-lines"))
DIFF_XDL_SET(options, IGNORE_BLANK_LINES);
else if (!strcmp(arg, "--indent-heuristic"))