diff options
author | Junio C Hamano <gitster@pobox.com> | 2017-11-27 11:06:31 +0900 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-11-27 11:06:31 +0900 |
commit | 10f65c239a885336b745cc9d2e1654980ffef41e (patch) | |
tree | f10ffd064f85e27f3ff8b64e0d26e179df8bca77 /t/t4015-diff-whitespace.sh | |
parent | 14c63a9dc093d6738454f6369a4f5663ca732cf7 (diff) | |
parent | e9282f02b2f21118f3383608718e38efc3d967e1 (diff) | |
download | git-10f65c239a885336b745cc9d2e1654980ffef41e.tar.gz |
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 't/t4015-diff-whitespace.sh')
-rwxr-xr-x | t/t4015-diff-whitespace.sh | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/t/t4015-diff-whitespace.sh b/t/t4015-diff-whitespace.sh index 6c9a93b734..559a7541a8 100755 --- a/t/t4015-diff-whitespace.sh +++ b/t/t4015-diff-whitespace.sh @@ -106,6 +106,8 @@ test_expect_success 'another test, without options' ' git diff -w -b --ignore-space-at-eol >out && test_cmp expect out && + git diff -w --ignore-cr-at-eol >out && + test_cmp expect out && tr "Q_" "\015 " <<-\EOF >expect && diff --git a/x b/x @@ -128,6 +130,9 @@ test_expect_success 'another test, without options' ' git diff -b --ignore-space-at-eol >out && test_cmp expect out && + git diff -b --ignore-cr-at-eol >out && + test_cmp expect out && + tr "Q_" "\015 " <<-\EOF >expect && diff --git a/x b/x index d99af23..22d9f73 100644 @@ -145,6 +150,29 @@ test_expect_success 'another test, without options' ' CR at end EOF git diff --ignore-space-at-eol >out && + test_cmp expect out && + + git diff --ignore-space-at-eol --ignore-cr-at-eol >out && + test_cmp expect out && + + tr "Q_" "\015 " <<-\EOF >expect && + diff --git a/x b/x + index_d99af23..22d9f73 100644 + --- a/x + +++ b/x + @@ -1,6 +1,6 @@ + -whitespace at beginning + -whitespace change + -whitespace in the middle + -whitespace at end + +_ whitespace at beginning + +whitespace_ _change + +white space in the middle + +whitespace at end__ + unchanged line + CR at end + EOF + git diff --ignore-cr-at-eol >out && test_cmp expect out ' |