From: Junio C Hamano Date: Tue, 30 Nov 2010 01:52:31 +0000 (-0800) Subject: Merge branch 'cm/diff-check-at-eol' X-Git-Tag: v1.7.4-rc0~113 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=039e84e30d38f51d68ab465bfae32ba8058b51a0;p=git.git Merge branch 'cm/diff-check-at-eol' * cm/diff-check-at-eol: diff --check: correct line numbers of new blank lines at EOF --- 039e84e30d38f51d68ab465bfae32ba8058b51a0 diff --cc t/t4019-diff-wserror.sh index f7c85ec60,87df0aeb5..3fa836f9d --- a/t/t4019-diff-wserror.sh +++ b/t/t4019-diff-wserror.sh @@@ -179,8 -178,17 +179,17 @@@ test_expect_success 'trailing empty lin ' + 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 + test_might_fail git config --unset core.whitespace && rm -f .gitattributes && echo AAAQ | tr Q "\015" >G && git add G &&