{"thread":{"id":"16910","subject":"turn off \"LF will be replaced by CRLF\" thingy","startedAt":"2008-12-29T15:05:46Z","lastAt":"2008-12-30T02:13:07Z","messageCount":7,"participants":["Zorba","Dmitry Potapov","david@lang.hm","Boyd Stephen Smith Jr."],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"98892","messageId":"gjaqta$tg7$4@ger.gmane.org","threadId":"16910","inReplyTo":null,"subject":"turn off \"LF will be replaced by CRLF\" thingy","fromName":"Zorba","fromEmail":"cr@altmore.co.uk","sentAt":null,"receivedAt":"2008-12-29T15:05:46Z","isPatch":false,"sender":{"key":"cr@altmore.co.uk","avatar":null},"body":"Dear All,\n\nI was just in the process of creating our first live version on git (5k+ \nfiles), when I noticed this in the output of\n\n$ git add .\n\nbeing \"Warning: LF will be replaced by CRLF in <filename>\"\nabout 500 times !!\n\nI'd rather not let git change any files, many of which are PHP that run on \nApache\nI think I remember reading that this is a config option that gets swithced \non by default on windows (which we are running git on)\n\nhow do I switch it off ?\n\nthanks \n"},{"id":"98893","messageId":"gjaru8$14g$4@ger.gmane.org","threadId":"16910","inReplyTo":"gjaqta$tg7$4@ger.gmane.org","subject":"Re: turn off \"LF will be replaced by CRLF\" thingy","fromName":"Zorba","fromEmail":"cr@altmore.co.uk","sentAt":null,"receivedAt":"2008-12-29T15:05:46Z","isPatch":false,"sender":{"key":"cr@altmore.co.uk","avatar":null},"body":"OK, lets be brave and see if I can work this out:\n\nTutorial says:\n\n\"The git configuration file contains a number of variables that affect the \ngit command's behavior. .git/config file for each repository is used to \nstore the information for that repository, and $HOME/.gitconfig is used to \nstore per user information to give fallback values for .git/config file. The \nfile /etc/gitconfig can be used to store system-wide defaults.\"\n\n.git/config\n======\n[core]\n repositoryformatversion = 0\n filemode = false\n bare = false\n logallrefupdates = true\n symlinks = false\n ignorecase = true\n\n\n$ echo $HOME\ngives:\nc\\docs and settings\\<my name>\n\n$HOME\\.gitconfig\n=============\n[gui]\n recentrepo = C:/Documents and Settings/conorr/Desktop/TEMP\n recentrepo = C:/Documents and Settings/conorr/Desktop/TEMP/swproj\n[user]\n email = cr@altmore.co.uk\n name = Conor Rafferty\n\n/etc/gitconfig  (under Git installation)\n===============================\n[core]\n symlinks = false\n autocrlf = true\n[color]\n diff = auto\n[pack]\n packSizeLimit = 2g\n[help]\n format = html\n\n\nThen tuturial -> the two settings are\ncore.autocrlf\nand\ncore.safecrlf\n\nSo I should set the autocrlf=false in the etc/config file I'm guessing?\nlets try that\n\n\n\"Zorba\" <cr@altmore.co.uk> wrote in message \nnews:gjaqta$tg7$4@ger.gmane.org...\n> Dear All,\n>\n> I was just in the process of creating our first live version on git (5k+ \n> files), when I noticed this in the output of\n>\n> $ git add .\n>\n> being \"Warning: LF will be replaced by CRLF in <filename>\"\n> about 500 times !!\n>\n> I'd rather not let git change any files, many of which are PHP that run on \n> Apache\n> I think I remember reading that this is a config option that gets swithced \n> on by default on windows (which we are running git on)\n>\n> how do I switch it off ?\n>\n> thanks\n>\n> \n"},{"id":"98894","messageId":"37fcd2780812290758q3ef989c0w5156da3098d06068@mail.gmail.com","threadId":"16910","inReplyTo":"gjaqta$tg7$4@ger.gmane.org","subject":"Re: turn off \"LF will be replaced by CRLF\" thingy","fromName":"Dmitry Potapov","fromEmail":"dpotapov@gmail.com","sentAt":"2008-12-29T15:58:50Z","receivedAt":"2008-12-29T15:58:50Z","isPatch":false,"sender":{"key":"dpotapov@gmail.com","avatar":"https://avatars.githubusercontent.com/u/6568595?v=4"},"body":"> I'd rather not let git change any files, many of which are PHP that run on\n> Apache\n> I think I remember reading that this is a config option that gets swithced\n> on by default on windows (which we are running git on)\n>\n> how do I switch it off ?\n\ngit config core.autocrlf false\n\nor if you want to ensure that all your text files have only LF then\n\ngit config core.autocrlf input\n\nor if you want to disable conversion for some specific files then you can\nuse 'crlf' attribute. See 'gitattributes' for more information.\nhttp://www.kernel.org/pub/software/scm/git/docs/gitattributes.html\n\nDmitry\n"},{"id":"98895","messageId":"gjat90$5la$4@ger.gmane.org","threadId":"16910","inReplyTo":"37fcd2780812290758q3ef989c0w5156da3098d06068@mail.gmail.com","subject":"Re: turn off \"LF will be replaced by CRLF\" thingy","fromName":"Zorba","fromEmail":"cr@altmore.co.uk","sentAt":null,"receivedAt":"2008-12-29T15:58:50Z","isPatch":false,"sender":{"key":"cr@altmore.co.uk","avatar":null},"body":"Thanks Dmitry,\n\nSo I have two options to do this - edit the files direct or issue a command, \nthank you !\n\nNow, my next problem is taking all my changes ($ git add .  -> puts 5k files \ninto index, with LF in place of CRLF) out of the index.\n\nBecause I haven't committed anything in this repo yet...\n\n$ git reset --hard\n\n....falls over, as it has no HEAD to reset to\n\nI think I read how to do this in a tutorial somewhere, maybe with \ngit-checkout, but I'm searching and can't find it.\nAny kind soul can point me in the right direction ?\n\nthanks !\n\"Dmitry Potapov\" <dpotapov@gmail.com> wrote in message \nnews:37fcd2780812290758q3ef989c0w5156da3098d06068@mail.gmail.com...\n>> I'd rather not let git change any files, many of which are PHP that run \n>> on\n>> Apache\n>> I think I remember reading that this is a config option that gets \n>> swithced\n>> on by default on windows (which we are running git on)\n>>\n>> how do I switch it off ?\n>\n> git config core.autocrlf false\n>\n> or if you want to ensure that all your text files have only LF then\n>\n> git config core.autocrlf input\n>\n> or if you want to disable conversion for some specific files then you can\n> use 'crlf' attribute. See 'gitattributes' for more information.\n> http://www.kernel.org/pub/software/scm/git/docs/gitattributes.html\n>\n> Dmitry \n"},{"id":"98896","messageId":"alpine.DEB.1.10.0812290928370.15026@asgard.lang.hm","threadId":"16910","inReplyTo":"gjat90$5la$4@ger.gmane.org","subject":"Re: turn off \"LF will be replaced by CRLF\" thingy","fromName":"","fromEmail":"david@lang.hm","sentAt":"2008-12-29T17:29:13Z","receivedAt":"2008-12-29T17:29:13Z","isPatch":false,"sender":{"key":"david@lang.hm","avatar":null},"body":"On Mon, 29 Dec 2008, Zorba wrote:\n\n> Thanks Dmitry,\n>\n> So I have two options to do this - edit the files direct or issue a command,\n> thank you !\n>\n> Now, my next problem is taking all my changes ($ git add .  -> puts 5k files\n> into index, with LF in place of CRLF) out of the index.\n>\n> Because I haven't committed anything in this repo yet...\n\nI think if you just do a git add . again it will put the files into the \nindex without doing the conversion.\n\nDavid Lang\n\n> $ git reset --hard\n>\n> ....falls over, as it has no HEAD to reset to\n>\n> I think I read how to do this in a tutorial somewhere, maybe with\n> git-checkout, but I'm searching and can't find it.\n> Any kind soul can point me in the right direction ?\n>\n> thanks !\n> \"Dmitry Potapov\" <dpotapov@gmail.com> wrote in message\n> news:37fcd2780812290758q3ef989c0w5156da3098d06068@mail.gmail.com...\n>>> I'd rather not let git change any files, many of which are PHP that run\n>>> on\n>>> Apache\n>>> I think I remember reading that this is a config option that gets\n>>> swithced\n>>> on by default on windows (which we are running git on)\n>>>\n>>> how do I switch it off ?\n>>\n>> git config core.autocrlf false\n>>\n>> or if you want to ensure that all your text files have only LF then\n>>\n>> git config core.autocrlf input\n>>\n>> or if you want to disable conversion for some specific files then you can\n>> use 'crlf' attribute. See 'gitattributes' for more information.\n>> http://www.kernel.org/pub/software/scm/git/docs/gitattributes.html\n>>\n>> Dmitry\n>\n>\n>\n> --\n> To unsubscribe from this list: send the line \"unsubscribe git\" in\n> the body of a message to majordomo@vger.kernel.org\n> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n>\n"},{"id":"98929","messageId":"gjbr5k$r89$4@ger.gmane.org","threadId":"16910","inReplyTo":"alpine.DEB.1.10.0812290928370.15026@asgard.lang.hm","subject":"Re: turn off \"LF will be replaced by CRLF\" thingy","fromName":"Zorba","fromEmail":"cr@altmore.co.uk","sentAt":null,"receivedAt":"2008-12-30T00:02:35Z","isPatch":false,"sender":{"key":"cr@altmore.co.uk","avatar":null},"body":"Hi David & thanks for helping me out,\n\nSo I tried again to do\n\n$ git add .\n\nthis time no warnings about CRLF / LF, in fact no output, so not sure if it \ndid anything (though took some time to process)\n\n$ git status\n\nShows all the files in the index ok, but I don't know if it was the first \ngit add or the second (post CRLF=false config change) that put them there \n....\n\nI'd like to be certain, as 500 out of 5000 files could just get changed here \n!\n\nI know I could just delete everything in .git dir, and git init again\n\nBut I'm after the intelligent way to do this :-(\n\n\n\n<david@lang.hm> wrote in message \nnews:alpine.DEB.1.10.0812290928370.15026@asgard.lang.hm...\n> On Mon, 29 Dec 2008, Zorba wrote:\n>\n>> Thanks Dmitry,\n>>\n>> So I have two options to do this - edit the files direct or issue a \n>> command,\n>> thank you !\n>>\n>> Now, my next problem is taking all my changes ($ git add .  -> puts 5k \n>> files\n>> into index, with LF in place of CRLF) out of the index.\n>>\n>> Because I haven't committed anything in this repo yet...\n>\n> I think if you just do a git add . again it will put the files into the \n> index without doing the conversion.\n>\n> David Lang\n>\n>> $ git reset --hard\n>>\n>> ....falls over, as it has no HEAD to reset to\n>>\n>> I think I read how to do this in a tutorial somewhere, maybe with\n>> git-checkout, but I'm searching and can't find it.\n>> Any kind soul can point me in the right direction ?\n>>\n>> thanks !\n>> \"Dmitry Potapov\" <dpotapov@gmail.com> wrote in message\n>> news:37fcd2780812290758q3ef989c0w5156da3098d06068@mail.gmail.com...\n>>>> I'd rather not let git change any files, many of which are PHP that run\n>>>> on\n>>>> Apache\n>>>> I think I remember reading that this is a config option that gets\n>>>> swithced\n>>>> on by default on windows (which we are running git on)\n>>>>\n>>>> how do I switch it off ?\n>>>\n>>> git config core.autocrlf false\n>>>\n>>> or if you want to ensure that all your text files have only LF then\n>>>\n>>> git config core.autocrlf input\n>>>\n>>> or if you want to disable conversion for some specific files then you \n>>> can\n>>> use 'crlf' attribute. See 'gitattributes' for more information.\n>>> http://www.kernel.org/pub/software/scm/git/docs/gitattributes.html\n>>>\n>>> Dmitry\n>>\n>>\n>>\n>> --\n>> To unsubscribe from this list: send the line \"unsubscribe git\" in\n>> the body of a message to majordomo@vger.kernel.org\n>> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n>> \n"},{"id":"98933","messageId":"200812292013.12217.bss@iguanasuicide.net","threadId":"16910","inReplyTo":"gjbr5k$r89$4@ger.gmane.org","subject":"Re: turn off \"LF will be replaced by CRLF\" thingy","fromName":"Boyd Stephen Smith Jr.","fromEmail":"bss@iguanasuicide.net","sentAt":"2008-12-30T02:13:07Z","receivedAt":"2008-12-30T02:13:07Z","isPatch":false,"sender":{"key":"bss@iguanasuicide.net","avatar":"https://gravatar.com/avatar/84b95eeff194b816c1568b1339e63e4b229825298664a9037b9f1ec713ead1e3?d=mp&s=160"},"body":"On Monday 29 December 2008, \"Zorba\" <cr@altmore.co.uk> wrote about 'Re: \nturn off \"LF will be replaced by CRLF\" thingy':\n>I'd like to be certain, as 500 out of 5000 files could just get changed\n> here !\n\n\"git reset\" will unstage all your changes.  You can then issue another \"git \nadd\" to stage what you want, and see any warnings or errors.\n-- \nBoyd Stephen Smith Jr.                     ,= ,-_-. =. \nbss@iguanasuicide.net                     ((_/)o o(\\_))\nICQ: 514984 YM/AIM: DaTwinkDaddy           `-'(. .)`-' \nhttp://iguanasuicide.net/                      \\_/     \n"}]}