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

Re: convert crlf to eol on vendor branch overlay

From
NKNeal Kreitzinger <nkreitzinger@gmail.com>
Date
Apr 8, 2011, 18:18 UTC
Message-ID
<4D9F5181.7050806@gmail.com>
In-Reply-To
<7vy63l4ak6.fsf@alter.siamese.dyndns.org>
On 4/7/2011 11:43 PM, Junio C Hamano wrote:
Show 21 quoted lines
> "Neal Kreitzinger"<neal@rsss.com>  writes:
>
>> How do I convert the eol's to LF?
>>
>> I tried this:
>>
>> vi .git/attributes
>> SRC/*/* text  (convert these to LF eol on commit)
>>
>> $ git config core.eol lf (convert "text" attr files to LF eol on checkout)
>
> Instead, how about something like:
>
>    $ git ls-files -z | xargs -0 perl -p -i -e 's/\r$//'
>
> and then:
>
>> $ git add . -A
>> $ git commit -m'convert eol'  (should convert CRLF to LF)
>
> ?
That worked!  Thanks!
Previous: Junio C Hamano
Message 3 of 3 in “convert crlf to eol on vendor branch overlay”
  1. Neal KreitzingerApr 8, 2011
  2. Junio C HamanoApr 8, 2011
  3. Neal KreitzingerApr 8, 2011

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.