Re: Improving CRLF error message; also, enabling autocrlf and safecrlf by default

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: Improving CRLF error message; also, enabling autocrlf and safecrlf by default

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:46:12

Jeff King [off-list ref] writes:
I'm happy you want to improve git; but please, if you want to report
problems, check what the status is in a more recent version (or at least
tell us your version, which can help).
...
It might be worth splitting the trailing whitespace detection into
"spaces and tabs at the end" and "CRLF", and providing different
messages (though it is hopefully also obvious with the new output that
it is a CRLF issue).
I think the status on this in a more recent version can be found by
running "git grep cr-at-eol" ;-)

Re: Improving CRLF error message; also, enabling autocrlf and safecrlf by default

From: Jeff King <hidden>
Date: 2016-06-15 22:46:12

On Sun, Feb 15, 2009 at 07:14:30PM -0800, Junio C Hamano wrote:
quoted
I'm happy you want to improve git; but please, if you want to report
problems, check what the status is in a more recent version (or at least
tell us your version, which can help).
...
It might be worth splitting the trailing whitespace detection into
"spaces and tabs at the end" and "CRLF", and providing different
messages (though it is hopefully also obvious with the new output that
it is a CRLF issue).
I think the status on this in a more recent version can be found by
running "git grep cr-at-eol" ;-)
Heh. You didn't quote the part where I already claimed to be clueless.
;)

But seriously, might it not be useful for users seeing --check warnings
for the first time to print:

  file:1: trailing whitespace (cr-at-eol).
  +foo^M

That is, there are different rules for trailing whitespace, but we don't
currently tell you which one triggered. Giving the user "cr-at-eol"
gives them something to grep before.

-Peff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help