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

core.autocrlf=true replaces LF with CRLF on Linux

From
Dun Peal <dunpealer@gmail.com>
Date
Oct 8, 2012, 17:03 UTC
Message-ID
<CAD03jn41w814XqdFq=PK+AAOQcXZtm0kQrGpobPfA-YULTpkPg@mail.gmail.com>

The docs indicate that core.autoccrlf=true will only replace LF with CRLFs if the runtime platform native line-endings are CRLF, since core.eol defaults to native. I have gone a step further on my box and set core.eol to "lf", and still get the same result: conversion of LFs to CRLFs on a newly created file. Full reproduction:

$ cat /etc/redhat-release; git --version Fedora release 17 (Beefy Miracle) git version 1.7.11.2 $ git config -l core.autocrlf=true core.eol=lf $ rm -rf test; mkdir test; cd test; git init; echo bar >foo.txt; git add foo.txt Initialized empty Git repository in /tmp/test/.git/ warning: LF will be replaced by CRLF in foo.txt. The file will have its original line endings in your working directory.

Message 1 of 1 in “core.autocrlf=true replaces LF with CRLF on Linux”
  1. Dun PealOct 8, 2012

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.