Re: [git-users] Avoid EOL hell
On Tue, Jun 2, 2015 at 11:07 PM, Konstantin Khomoutov flatw...@users.sourceforge.net wrote: On Tue, 2 Jun 2015 22:09:46 +0530 Rustom Mody wrote: Setting up for a project in which both linux and windows will be the OSes. After spending some time searching for solutions I am as confused as ever. What are the optimum crlf settings so that files (maybe of designated types, say .c and .h files) are CRLF on windows and LF on linux? I recommend reading through [1]. In short, core.autocrlf set to auto on Windows should, in theory, ensure that the text files have CRLF EOLs in the work tree and LFs in the index and the object store. But that's, well, in theory, and you might need to cater for the bogosity of particular tools. (I'm assuming you're using Git for Windows on Windows. Cygwin's Git lives in its own POSIX-y world and considers LFs to be the platform's native EOLs. The installer of GfW sets core.autocrlf to auto by default, and, AFAIK, there's no way to tell it not to.) 1. https://github.com/mono/mono/blob/master/.gitattributes Thanks Konstantin for the pointer. Can hardly claim to understand all the ins and outs of this... From http://adaptivepatchwork.com/2012/03/01/mind-the-end-of-your-line/ I gather this is the old system And in the new system those crlfs should/would be text [This is also what I infer from the somewhat cryptic section Backwards compatibility with crlf attribute of the gitattributes man-page] Is that correct? IOW I can attribute all the file-types I want correct as per OS as text? Rusi -- http://www.the-magus.in http://blog.languager.org -- You received this message because you are subscribed to the Google Groups Git for human beings group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [git-users] Avoid EOL hell
Y prefer to ensure that everyone uses Linux EOL, but that's not an easy task. El mar, jun 2, 2015 14:37, Konstantin Khomoutov flatw...@users.sourceforge.net escribió: On Tue, 2 Jun 2015 22:09:46 +0530 Rustom Mody rustompm...@gmail.com wrote: Setting up for a project in which both linux and windows will be the OSes. After spending some time searching for solutions I am as confused as ever. What are the optimum crlf settings so that files (maybe of designated types, say .c and .h files) are CRLF on windows and LF on linux? I recommend reading through [1]. In short, core.autocrlf set to auto on Windows should, in theory, ensure that the text files have CRLF EOLs in the work tree and LFs in the index and the object store. But that's, well, in theory, and you might need to cater for the bogosity of particular tools. (I'm assuming you're using Git for Windows on Windows. Cygwin's Git lives in its own POSIX-y world and considers LFs to be the platform's native EOLs. The installer of GfW sets core.autocrlf to auto by default, and, AFAIK, there's no way to tell it not to.) 1. https://github.com/mono/mono/blob/master/.gitattributes -- You received this message because you are subscribed to the Google Groups Git for human beings group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Git for human beings group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[git-users] Avoid EOL hell
Setting up for a project in which both linux and windows will be the OSes. After spending some time searching for solutions I am as confused as ever. What are the optimum crlf settings so that files (maybe of designated types, say .c and .h files) are CRLF on windows and LF on linux? -- You received this message because you are subscribed to the Google Groups Git for human beings group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [git-users] Avoid EOL hell
On Tue, 2 Jun 2015 22:09:46 +0530 Rustom Mody rustompm...@gmail.com wrote: Setting up for a project in which both linux and windows will be the OSes. After spending some time searching for solutions I am as confused as ever. What are the optimum crlf settings so that files (maybe of designated types, say .c and .h files) are CRLF on windows and LF on linux? I recommend reading through [1]. In short, core.autocrlf set to auto on Windows should, in theory, ensure that the text files have CRLF EOLs in the work tree and LFs in the index and the object store. But that's, well, in theory, and you might need to cater for the bogosity of particular tools. (I'm assuming you're using Git for Windows on Windows. Cygwin's Git lives in its own POSIX-y world and considers LFs to be the platform's native EOLs. The installer of GfW sets core.autocrlf to auto by default, and, AFAIK, there's no way to tell it not to.) 1. https://github.com/mono/mono/blob/master/.gitattributes -- You received this message because you are subscribed to the Google Groups Git for human beings group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.