From: Junio C Hamano Date: Wed, 17 Nov 2010 22:39:45 +0000 (-0800) Subject: Merge branch 'cm/diff-check-at-eol' into next X-Git-Tag: ko-next~138 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=ad7005aa0d831de10a14dcb213d586fb78013964;p=git.git Merge branch 'cm/diff-check-at-eol' into next * cm/diff-check-at-eol: diff --check: correct line numbers of new blank lines at EOF --- ad7005aa0d831de10a14dcb213d586fb78013964 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 &&