diff: --ignore-cr-at-eol
A new option --ignore-cr-at-eol tells the diff machinery to treat a carriage-return at the end of a (complete) line as if it does not exist. Just like other "--ignore-*" options to ignore various kinds of whitespace differences, this will help reviewing the real changes you made without getting distracted by spurious CRLF<->LF conversion made by your editor program. Helped-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> [jch: squashed in command line completion by Dscho] Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
2
diff.c
2
diff.c
@ -3888,6 +3888,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"))
|
||||
|
Reference in New Issue
Block a user