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

CRLF behavior

From
JDJohn Dlugosz <jdlugosz@tradestation.com>
Date
Jul 21, 2010, 21:18 UTC
Message-ID
<1A9EA7E081C3FE46A0F446FFB66D10EB9398F1@FL01EXMB01.trad.tradestation.com>
I'm running MSYSgit on Windows, and have no mention of any kind of crlf conversion in the config files.  Running git config --list shows nothing that would suggest any such setting.  So, my autocrlf is "unspecified" which according to the docs defaults to false, which means "don't mess with it", right?
A co-worker got a autocrlf=true set when some git tool was updated, and made a mess before it was noticed.
Now, looking at one commit for example, I see a file in it that reports all lines have changed.  Clearly it's checked in with LF's, and gitk will make it go away if I check the "ignore whitespace" box.  The "external diff" (kdiff3) reports "text is the same but files are not binary identical".  So far, so good.
But if I check out his commit, I see files with CRLF endings.  Why is it doing that?  I had to spy on the temp files used by the diff tool in order to see the LF line endings.  So it seems able to cough up a proper exact copy, but normally changes it during a checkout operation.
I get mysterious things like after checking out, it immediately says I have a bunch of files changed.  Or, it didn't show any; and after saving one file (no actual change) and rescanning, I had 5 files "changed".  I'm guessing it is getting confused because sometimes it sees the internal representation and sometimes it sees the translated representation.
What's going on?
--John
(sorry about the footer)
TradeStation Group, Inc. is a publicly-traded holding company (NASDAQ GS: TRAD) of three operating subsidiaries, TradeStation Securities, Inc. (Member NYSE, FINRA, SIPC and NFA), TradeStation Technologies, Inc., a trading software and subscription company, and TradeStation Europe Limited, a United Kingdom, FSA-authorized introducing brokerage firm. None of these companies provides trading or investment advice, recommendations or endorsements of any kind. The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer.
Next: Avery Pennarun
Message 1 of 9 in “CRLF behavior”
  1. John DlugoszJul 21, 2010
  2. Avery PennarunJul 21, 2010
  3. John DlugoszJul 21, 2010
  4. Avery PennarunJul 21, 2010
  5. Avery PennarunJul 21, 2010
  6. John DlugoszJul 21, 2010
  7. John DlugoszJul 21, 2010
  8. Finn Arne GangstadJul 26, 2010
  9. John DlugoszJul 26, 2010

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.