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

Re: [PATCH/RFC] blame: CRLF in the working tree and LF in the repo

From
Johannes Sixt <j6t@kdbg.org>
Date
Apr 28, 2015, 18:42 UTC
Message-ID
<553FD48B.1010608@kdbg.org>
In-Reply-To
<553E91CD.9060205@web.de>
Am 27.04.2015 um 21:45 schrieb Torsten Bögershausen:
Show 19 quoted lines
> On 04/27/2015 08:58 PM, Johannes Sixt wrote:
>> Am 27.04.2015 um 08:11 schrieb Stepan Kasal:
>>> Git does not support CRLF as the internal line separator.
>>> If you commit file in binary mode with CRLF, you are on your own.
>>
>> When I commit my C source code files with CRLF into the repository
>> (because I do not set any line ending options or configurations or any
>> 'text' attributes or similar), do I then commit binary files or text
>> files? Should I expect not to see any diffs?
>>
>> -- Hannes
>>
> You commit files with CRLF in the repo.
> If you have CRLF in the working tree, things are as follows:
>
> core.autocrlf=false   : "Same as binary, no changes"
> core.autocrlf=true    : "Normalization is suppressed, (CRLF in repo), and therefore no changes.
> core.autocrlf=input   : "Normalization wanted, (CRLF in repo), normalization will be done
>                                                 (and should be committed as soon as possible)

I set none of these. But I do commit CRLF and expect to get CRLF back. Am I commiting binary files? Am I doing something that "Git does not support"? Am I "on [my] own"?

-- Hannes
Previous: Torsten BögershausenNext: Junio C Hamano
Message 8 of 16 in “blame: CRLF in the working tree and LF in the repo”
  1. blame: CRLF in the working tree and LF in the repoTorsten Bögershausen, Apr 26, 2015
  2. Eric SunshineApr 26, 2015
  3. Stepan KasalApr 27, 2015
  4. Junio C HamanoApr 27, 2015
  5. Stepan KasalApr 27, 2015
  6. Johannes SixtApr 27, 2015
  7. Torsten BögershausenApr 27, 2015
  8. Johannes SixtApr 28, 2015
  9. Junio C HamanoApr 28, 2015
  10. Johannes SixtApr 28, 2015
  11. Stepan KasalApr 28, 2015
  12. Junio C HamanoApr 27, 2015
  13. Torsten BögershausenApr 27, 2015
  14. Junio C HamanoApr 28, 2015
  15. Torsten BögershausenApr 28, 2015
  16. brian m. carlsonApr 28, 2015

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.