diff options
author | Junio C Hamano <gitster@pobox.com> | 2010-11-29 17:52:31 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-11-29 17:52:31 -0800 |
commit | 039e84e30d38f51d68ab465bfae32ba8058b51a0 (patch) | |
tree | b7f8c37bebd8ec45d0ed6db44eb9500f82208bf1 /t/t4019-diff-wserror.sh | |
parent | f565f6e06511249c8c3690277023a8550dbdfb47 (diff) | |
parent | 8837d33595b78dc4a52038856bc9a5c3f4b2ff50 (diff) | |
download | git-039e84e30d38f51d68ab465bfae32ba8058b51a0.tar.gz |
Merge branch 'cm/diff-check-at-eol'
* cm/diff-check-at-eol:
diff --check: correct line numbers of new blank lines at EOF
Diffstat (limited to 't/t4019-diff-wserror.sh')
-rwxr-xr-x | t/t4019-diff-wserror.sh | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/t/t4019-diff-wserror.sh b/t/t4019-diff-wserror.sh index f7c85ec604..3fa836f9d3 100755 --- a/t/t4019-diff-wserror.sh +++ b/t/t4019-diff-wserror.sh @@ -179,6 +179,15 @@ test_expect_success 'trailing empty lines (2)' ' ' +test_expect_success 'checkdiff shows correct line number for trailing blank lines' ' + + printf "a\nb\n" > G && + git add G && + printf "x\nx\nx\na\nb\nc\n\n" > G && + [ "$(git diff --check -- G)" = "G:7: new blank line at EOF." ] + +' + test_expect_success 'do not color trailing cr in context' ' test_might_fail git config --unset core.whitespace && rm -f .gitattributes && |