diff options
author | Junio C Hamano <gitster@pobox.com> | 2009-09-04 09:30:27 +0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-09-04 22:50:26 +0400 |
commit | 5b5061efd88e1d113a4484369dfab654b43364de (patch) | |
tree | 3acca65370698604617c2d771c6512d16820d84e /t/t4015-diff-whitespace.sh | |
parent | b8d9c1a66b99ad3ca8069add010dafdd1bc6cab8 (diff) |
diff --whitespace=warn/error: obey blank-at-eof
The "diff --check" code used to conflate trailing-space whitespace error
class with this, but now we have a proper separate error class, we should
check it under blank-at-eof, not trailing-space.
The whitespace error is not about _having_ blank lines at end, but about
adding _new_ blank lines. To keep the message consistent with what is
given by "git apply", call whitespace_error_string() to generate it,
instead of using a hardcoded custom message.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4015-diff-whitespace.sh')
-rwxr-xr-x | t/t4015-diff-whitespace.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/t/t4015-diff-whitespace.sh b/t/t4015-diff-whitespace.sh index b1cbd36d17..a5d4461574 100755 --- a/t/t4015-diff-whitespace.sh +++ b/t/t4015-diff-whitespace.sh @@ -335,10 +335,10 @@ test_expect_success 'line numbers in --check output are correct' ' ' -test_expect_success 'checkdiff detects trailing blank lines' ' +test_expect_success 'checkdiff detects new trailing blank lines (1)' ' echo "foo();" >x && echo "" >>x && - git diff --check | grep "ends with blank" + git diff --check | grep "new blank line" ' test_expect_success 'checkdiff allows new blank lines' ' |