Mercurial > public > mercurial-scm > hg
diff tests/test-diff-ignore-whitespace.t @ 34013:da07367d683b
mdiff: add a --ignore-space-at-eol option
Add an option that only ignores whitespaces at EOL. The name of the option is
the same as Git.
.. feature::
Added `--ignore-space-at-eol` diff option to ignore whitespace differences
at line endings.
Differential Revision: https://phab.mercurial-scm.org/D422
author | David Soria Parra <davidsp@fb.com> |
---|---|
date | Tue, 29 Aug 2017 18:20:50 -0700 |
parents | 405b6bd015df |
children | 55c6ebd11cb9 |
line wrap: on
line diff
--- a/tests/test-diff-ignore-whitespace.t Fri Aug 25 11:20:34 2017 -0700 +++ b/tests/test-diff-ignore-whitespace.t Tue Aug 29 18:20:50 2017 -0700 @@ -407,8 +407,23 @@ +goodbye\r (no-eol) (esc) world +Test \r (carriage return) as used in "DOS" line endings: + + $ printf 'hello world \r\n\t\ngoodbye world\n' >foo + + $ hg ndiff --ignore-space-at-eol + diff -r 540c40a65b78 foo + --- a/foo + +++ b/foo + @@ -1,2 +1,3 @@ + hello world + +\t (esc) + goodbye world + No completely blank lines to ignore: + $ printf 'hello world\r\n\r\ngoodbye\rworld\n' >foo + $ hg ndiff --ignore-blank-lines diff -r 540c40a65b78 foo --- a/foo