diff options
author | Junio C Hamano <gitster@pobox.com> | 2010-12-09 10:36:10 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-12-09 10:36:10 -0800 |
commit | ae0a37cd6bc05b5ab511d0d1a541dc57d52753e6 (patch) | |
tree | 283e01c4e52e198664413234c87b2993796b3e25 /t | |
parent | d3334d9c444a22847e7add0f60c2e4a7243c151e (diff) | |
parent | 8837d33595b78dc4a52038856bc9a5c3f4b2ff50 (diff) | |
download | git-ae0a37cd6bc05b5ab511d0d1a541dc57d52753e6.tar.gz |
Merge branch 'cm/diff-check-at-eol' into maint
* cm/diff-check-at-eol:
diff --check: correct line numbers of new blank lines at EOF
Diffstat (limited to 't')
-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 f6d1f1ebab..87df0aeb59 100755 --- a/t/t4019-diff-wserror.sh +++ b/t/t4019-diff-wserror.sh @@ -178,6 +178,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' ' git config --unset core.whitespace rm -f .gitattributes && |