comparison 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
comparison
equal deleted inserted replaced
34012:dcfdf4d09663 34013:da07367d683b
405 +hello world\r (esc) 405 +hello world\r (esc)
406 +\r (esc) 406 +\r (esc)
407 +goodbye\r (no-eol) (esc) 407 +goodbye\r (no-eol) (esc)
408 world 408 world
409 409
410 Test \r (carriage return) as used in "DOS" line endings:
411
412 $ printf 'hello world \r\n\t\ngoodbye world\n' >foo
413
414 $ hg ndiff --ignore-space-at-eol
415 diff -r 540c40a65b78 foo
416 --- a/foo
417 +++ b/foo
418 @@ -1,2 +1,3 @@
419 hello world
420 +\t (esc)
421 goodbye world
422
410 No completely blank lines to ignore: 423 No completely blank lines to ignore:
424
425 $ printf 'hello world\r\n\r\ngoodbye\rworld\n' >foo
411 426
412 $ hg ndiff --ignore-blank-lines 427 $ hg ndiff --ignore-blank-lines
413 diff -r 540c40a65b78 foo 428 diff -r 540c40a65b78 foo
414 --- a/foo 429 --- a/foo
415 +++ b/foo 430 +++ b/foo