git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Jeff King <peff@peff.net>
Date
Feb 16, 2009, 03:18 UTC
Message-ID
<20090216031849.GA12348@coredump.intra.peff.net>
In-Reply-To
<7vhc2vf4yx.fsf@gitster.siamese.dyndns.org>
On Sun, Feb 15, 2009 at 07:14:30PM -0800, Junio C Hamano wrote:
Show 11 quoted lines
> > 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
Previous: Junio C HamanoNext: Jason Spiro
Message 4 of 7 in “Improving CRLF error message; also, enabling autocrlf and safecrlf by default”
  1. Jason SpiroFeb 16, 2009
  2. Jeff KingFeb 16, 2009
  3. Junio C HamanoFeb 16, 2009
  4. Jeff KingFeb 16, 2009
  5. Jason SpiroFeb 16, 2009
  6. Jeff KingFeb 16, 2009
  7. Junio C HamanoFeb 16, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.