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

Re: [PATCH master] convert: The native line-ending is \r\n on MinGW

From
Erik Faye-Lund <kusmabite@gmail.com>
Date
Apr 15, 2013, 21:20 UTC
Message-ID
<CABPQNSaA7Qdt5eCZR3rs87gL730Y_xMrg6S-++YuaXdC2k45jg@mail.gmail.com>
In-Reply-To
<7v4nf7qzkd.fsf@alter.siamese.dyndns.org>
On Mon, Apr 15, 2013 at 11:00 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 46 quoted lines
> Junio C Hamano <gitster@pobox.com> writes:
>
>> Jonathan Nieder <jrnieder@gmail.com> writes:
>>
>>> If you try this:
>>>
>>>  1. Install Git for Windows (from the msysgit project)
>>>  2. Put
>>>
>>>      [core]
>>>              autocrlf = false
>>>              eol = native
>>>
>>>     in your .gitconfig.
>>>  3. Clone a project with
>>>
>>>      *.txt text
>>>
>>>     in its .gitattributes.
>>>
>>> Then with current git, any text files checked out have LF line
>>> endings, instead of the expected CRLF.
>>>
>>> Cc: Johannes Schindelin <johannes.schindelin@gmx.de>
>>> Cc: Johannes Sixt <j6t@kdbg.org>
>>> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
>>> ---
>>> Eyvind Bernhardsen wrote:
>>>
>>>> Introduce a new configuration variable, "core.eol", that allows the user
>>>> to set which line endings to use for end-of-line-normalized files in the
>>>> working directory.  It defaults to "native", which means CRLF on Windows
>>>> and LF everywhere else.
>>>
>>> The following fixup has been sitting in my tree (but not tested on
>>> Windows) for a couple of weeks.  Sensible?
>>>
>>> I don't know what the right choice for Cygwin is; probably LF unless
>>> there is some way to detect the systemwide setting at run time.
>>
>> Has anybody in Windows land any input?  I don't think what I do before
>> 1.7.3 in my tree would matter much, so I am not applying this myself.
>
> Pinging MsysGit folk again ...
>
>

This is absolutely the right thing to do. However, stuff have changed a bit since the patch was written; this change now needs to go in config.mak.uname instead of config.mak.

Previous: Junio C HamanoNext: Junio C Hamano
Message 10 of 14 in “Add "core.eol" config variable”
  1. Add "core.eol" config variableEyvind Bernhardsen, Jun 4, 2010
  2. convert: The native line-ending is \r\n on MinGWJonathan Nieder, Sep 4, 2010
  3. Junio C HamanoSep 7, 2010
  4. Ramsay JonesSep 25, 2010
  5. Mr_and_Mrs_DNov 25, 2012
  6. Brice LambsonApr 15, 2013
  7. TvangesteAug 13, 2013
  8. Junio C HamanoAug 13, 2013
  9. Junio C HamanoApr 15, 2013
  10. Erik Faye-LundApr 15, 2013
  11. Junio C HamanoApr 15, 2013
  12. Erik Faye-LundApr 16, 2013
  13. Johannes SixtApr 16, 2013
  14. Junio C HamanoApr 16, 2013

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.