author | Junio C Hamano <gitster@pobox.com> | |
Wed, 17 Nov 2010 22:39:45 +0000 (14:39 -0800) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 17 Nov 2010 22:39:45 +0000 (14:39 -0800) |
* cm/diff-check-at-eol:
diff --check: correct line numbers of new blank lines at EOF
diff --check: correct line numbers of new blank lines at EOF
1 | 2 | |||
---|---|---|---|---|
diff.c | patch | | diff1 | | diff2 | | blob | history |
t/t4019-diff-wserror.sh | patch | | diff1 | | diff2 | | blob | history |
diff --cc diff.c
Simple merge
diff --cc t/t4019-diff-wserror.sh
index f7c85ec604df5e037990065ab9d3d82d86587076,87df0aeb59ecb22f07454ce08172f8cfa4940591..3fa836f9d3c19f351ce5451049eb191776cbd4a5
+++ b/t/t4019-diff-wserror.sh
'
+ 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 &&