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

Re: git status internals and line endings

From
Erik Faye-Lund <kusmabite@googlemail.com>
Date
Nov 13, 2009, 09:04 UTC
Message-ID
<40aa078e0911130104v6acdecedxf629c5ef35a62740@mail.gmail.com>
In-Reply-To
<4AFD1414.6030907@syntevo.com>

On Fri, Nov 13, 2009 at 9:08 AM, Marc Strapetz <marc.strapetz@syntevo.com> wrote:

Show 11 quoted lines
>> Sounds like the core.autocrlf setting (see "git help config"), which I
>> believe is set by default on Windows.
>
> I have checked both $GIT_DIR/config and ~/.gitconfig and autocrlf has
> not been set. I have then set autocrlf = false for the Windows
> repository and still the file didn't show up as modified. On Linux, I've
> added autocrlf = true (resp. autocrlf = input) for the repository and
> still the file shows up as modified. Not that I don't like this
> behavior, but I don't understand it :) Windows Git version is 1.6.5.1,
> Linux version is 1.6.3.3.
>

In order to make changes to core.autocrlf effective, you need to delete .git/index and perform a hard reset: $ rm .git/index $ git reset --hard

Did you do this before checking if the files were modified?
-- 
Erik "kusma" Faye-Lund
Previous: Marc StrapetzNext: Marc Strapetz
Message 4 of 6 in “git status internals and line endings”
  1. Marc StrapetzNov 12, 2009
  2. Jeff KingNov 13, 2009
  3. Marc StrapetzNov 13, 2009
  4. Erik Faye-LundNov 13, 2009
  5. Marc StrapetzNov 13, 2009
  6. Peter KreftingNov 13, 2009

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.