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

Re: Bug: Problem with CRLF line ending in git-diff with coloring

From
Johannes Sixt <j6t@kdbg.org>
Date
Feb 14, 2014, 21:19 UTC
Message-ID
<52FE8847.8020101@kdbg.org>
In-Reply-To
<20140214164709.GI7560@pille.home>
Am 14.02.2014 17:47, schrieb Stefan-W. Hahn:
Show 6 quoted lines
>> It's the right solution. IOW, you should place something like this in
>> your .gitattributes:
>>  *.html whitespace=cr-at-eol
> 
> Sorry, but this is not possible, because I have files of both sorts (mainly
> C/C++) files in my repository and cannot change the files as I wish.

I'm confused. This setting does not change your files, but instructs git diff and git apply to not report the trailing CR as white-space error. Didn't you try it?

-- Hannes
Previous: Stefan-W. HahnNext: Stefan-W. Hahn
Message 4 of 6 in “Bug: Problem with CRLF line ending in git-diff with coloring”
  1. Stefan-W. HahnFeb 9, 2014
  2. Johannes SixtFeb 9, 2014
  3. Stefan-W. HahnFeb 14, 2014
  4. Johannes SixtFeb 14, 2014
  5. Stefan-W. HahnFeb 15, 2014
  6. Stefan-W. HahnFeb 14, 2014

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.