{"thread":{"id":"7162","subject":"Problems with autoCRLF?","startedAt":"2007-03-09T18:15:02Z","lastAt":"2007-03-10T12:23:21Z","messageCount":5,"participants":["Raimund Bauer","Robin Rosenberg","Linus Torvalds","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"36682","messageId":"1173464102.6102.18.camel@localhost","threadId":"7162","inReplyTo":null,"subject":"Problems with autoCRLF?","fromName":"Raimund Bauer","fromEmail":"ray007@gmx.net","sentAt":"2007-03-09T18:15:02Z","receivedAt":"2007-03-09T18:15:02Z","isPatch":false,"sender":{"key":"ray007@gmx.net","avatar":null},"body":"Is it really intended that with a setting core.autoCRLF=true textfiles\nare checked out with crlf-lineendings on linux-boxes?\n\nI found out because the git-compilation broke ...\n\nNow using core.autocrlf=input ;-)\n\n-- \nbest regards\n\n  Ray\n"},{"id":"36689","messageId":"200703092051.47441.robin.rosenberg.lists@dewire.com","threadId":"7162","inReplyTo":"1173464102.6102.18.camel@localhost","subject":"Re: Problems with autoCRLF?","fromName":"Robin Rosenberg","fromEmail":"robin.rosenberg.lists@dewire.com","sentAt":"2007-03-09T19:51:47Z","receivedAt":"2007-03-09T19:51:47Z","isPatch":false,"sender":{"key":"robin.rosenberg@dewire.com","avatar":"https://avatars.githubusercontent.com/u/46357?v=4"},"body":"fredag 09 mars 2007 19:15 skrev Raimund Bauer:\n> Is it really intended that with a setting core.autoCRLF=true textfiles\n> are checked out with crlf-lineendings on linux-boxes?\n> \n> I found out because the git-compilation broke ...\n> \n> Now using core.autocrlf=input ;-)\n\nMy guess is it's good for testing without having to compromise your \ncomputer (or with cygwin).\n\n-- robin\n"},{"id":"36692","messageId":"Pine.LNX.4.64.0703091337270.10832@woody.linux-foundation.org","threadId":"7162","inReplyTo":"200703092051.47441.robin.rosenberg.lists@dewire.com","subject":"Re: Problems with autoCRLF?","fromName":"Linus Torvalds","fromEmail":"torvalds@linux-foundation.org","sentAt":"2007-03-09T21:38:52Z","receivedAt":"2007-03-09T21:38:52Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Fri, 9 Mar 2007, Robin Rosenberg wrote:\n\n> fredag 09 mars 2007 19:15 skrev Raimund Bauer:\n> > Is it really intended that with a setting core.autoCRLF=true textfiles\n> > are checked out with crlf-lineendings on linux-boxes?\n> > \n> > I found out because the git-compilation broke ...\n> > \n> > Now using core.autocrlf=input ;-)\n> \n> My guess is it's good for testing without having to compromise your \n> computer (or with cygwin).\n\nExactly. I'd much rather have git work consistently across different \narchitectures, so that we can develop and test the CRLF code under UNIX, \nwithout having to actually have to use the brain damage that is Windows.\n\nSo yes, don't set \"core.autocrlf=true\" under UNIX. It will \"work\", but it \nwill work exactly in the sense of \"you can test what we'd do under \nWindows\" ;)\n\n\t\tLinus\n"},{"id":"36711","messageId":"7v8xe528mk.fsf@assigned-by-dhcp.cox.net","threadId":"7162","inReplyTo":"1173464102.6102.18.camel@localhost","subject":"Re: Problems with autoCRLF?","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-03-10T01:24:35Z","receivedAt":"2007-03-10T01:24:35Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Raimund Bauer <ray007@gmx.net> writes:\n\n> Is it really intended that with a setting core.autoCRLF=true textfiles\n> are checked out with crlf-lineendings on linux-boxes?\n\nYes.  The implicit assumption with any setting to core.autoCRLF\nis that you want to keep the git objects free of CRLF line\nendings.\n\n - core.autoCRLF 'true' means that your tools that handle text\n   files would be upset findign LF line endings, and they will\n   leave text in CRLF line endings.  Checking out from git\n   creates working tree files while adding CR before LF as\n   needed, and checking in from working tree files to git strips\n   CR before LF as needed.\n\n - core.autoCRLF 'input' means that your tools do not mind\n   handling text files in LF line endings and they will leave\n   text in CRLF line endings, so checking out from git creates\n   working tree files by just giving what is stored in the\n   repository, and checking in from working tree files to git\n   strips CR before LF as needed.\n\nSo on sane platforms, you do not want to set that variable,\nunless you are helping to test and improve that feature.\n"},{"id":"36744","messageId":"1173529401.5975.10.camel@localhost","threadId":"7162","inReplyTo":"7v8xe528mk.fsf@assigned-by-dhcp.cox.net","subject":"Re: Problems with autoCRLF?","fromName":"Raimund Bauer","fromEmail":"ray007@gmx.net","sentAt":"2007-03-10T12:23:21Z","receivedAt":"2007-03-10T12:23:21Z","isPatch":false,"sender":{"key":"ray007@gmx.net","avatar":null},"body":"On Fri, 2007-03-09 at 17:24 -0800, Junio C Hamano wrote:\n\n> So on sane platforms, you do not want to set that variable,\n> unless you are helping to test and improve that feature.\n\nIn that case we should document it as well. Having the information in\nthe Releasenotes is nice, but having it in the git-config manpage too\nmay be better, text taken straight from the Releasenotes for git 1.5.1.\n\n---\n Documentation/config.txt |   11 +++++++++++\n 1 files changed, 11 insertions(+), 0 deletions(-)\n\ndiff --git a/Documentation/config.txt b/Documentation/config.txt\nindex 5408dd6..7864ea3 100644\n--- a/Documentation/config.txt\n+++ b/Documentation/config.txt\n@@ -137,6 +137,17 @@ Can be overridden by the 'GIT_PROXY_COMMAND' environment variable\n (which always applies universally, without the special \"for\"\n handling).\n \n+core.autocrlf::\n+    When set to 'true', makes git to convert CRLF at the end of lines\n+    in text files to LF when reading from the filesystem, and convert\n+    in reverse when writing to the filesystem.  The variable can be\n+    set to 'input', in which case the conversion happens only while\n+    reading from the filesystem but files are written out with LF at\n+    the end of lines.  Currently, which paths to consider 'text'\n+    (i.e. be subjected to the autocrlf mechanism) is decided purely\n+    based on the contents, but the plan is to allow users to\n+    explicitly override this heuristic based on paths.\n+\n core.ignoreStat::\n \tThe working copy files are assumed to stay unchanged until you\n \tmark them otherwise manually - Git will not detect the file changes\n-- \n1.5.0.3.942.g299f\n\n-- \nbest regards\n\n  Ray\n"}]}