{"thread":{"id":"39678","subject":"Re: [msysGit] crlf issues","startedAt":"2015-06-19T14:10:54Z","lastAt":"2015-06-20T06:21:54Z","messageCount":3,"participants":["Johannes Schindelin","Rusi Mody"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"264330","messageId":"b1d861878d2f0a4414490439bf865cbb@www.dscho.org","threadId":"39678","inReplyTo":"f96f4550-af8c-48b9-98ef-2c1f3282d8a7@googlegroups.com","subject":"Re: [msysGit] crlf issues","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2015-06-19T14:10:54Z","receivedAt":"2015-06-19T14:10:54Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Rusi,\n\nCc:ing the main Git list, as some of this has been discussed at the GitMerge in Paris, and some participants of that discussion might want to join this thread.\n \nOn 2015-06-19 14:55, Rusi Mody wrote:\n> Trying to setup git.\n> Majority folks are MS VS users but also some *nixers.\n> \n> My current understanding/analysis of the situation:\n> \n> 1. autocrlf is broken -- keep it false \n> 2. safecrlf is a cure (to some extent) -- keep it true\n> 3. core.eol can be left native (or is crlf on windows/lf on *nix \n> preferred??)\n> \n> And of course most crucial: \n> 4. Make sure ALL file types are covered in .gitattributes; eg\n> \n> *.txt text\n> *.cs text\n> :\n> :\n> *.pdf binary\n> etc\n> \n> Still when we get a merge conflict the file (created by git with conflict \n> markers) shows ^M in vi\n> ie I assume its unclean line endings.\n> \n> Any tips what to do?\n\nThe most important preliminary question is: how cross platform is your project? If there is no risk of any developer working on a non-Windows platform, you could simply commit CRLF and be done with it.\n\nAs to autocrlf: I actually had some good experience with setting it to `input` when working with other developers.\n\nCiao,\nJohannes\n"},{"id":"264335","messageId":"06bed56e-b934-43e1-af1e-df1253c07dac@googlegroups.com","threadId":"39678","inReplyTo":"b1d861878d2f0a4414490439bf865cbb@www.dscho.org","subject":"Re: crlf issues","fromName":"Rusi Mody","fromEmail":"rustompmody@gmail.com","sentAt":"2015-06-19T15:29:18Z","receivedAt":"2015-06-19T15:29:18Z","isPatch":false,"sender":{"key":"rustompmody@gmail.com","avatar":null},"body":"\n\nOn Friday, June 19, 2015 at 7:41:00 PM UTC+5:30, Johannes Schindelin wrote:\n>\n> Hi Rusi, \n>\n> Cc:ing the main Git list, as some of this has been discussed at the \n> GitMerge in Paris, and some participants of that discussion might want to \n> join this thread. \n>   \n> On 2015-06-19 14:55, Rusi Mody wrote: \n> > Trying to setup git. \n> > Majority folks are MS VS users but also some *nixers. \n> > \n> > My current understanding/analysis of the situation: \n> > \n> > 1. autocrlf is broken -- keep it false \n> > 2. safecrlf is a cure (to some extent) -- keep it true \n> > 3. core.eol can be left native (or is crlf on windows/lf on *nix \n> > preferred??) \n> > \n> > And of course most crucial: \n> > 4. Make sure ALL file types are covered in .gitattributes; eg \n> > \n> > *.txt text \n> > *.cs text \n> > : \n> > : \n> > *.pdf binary \n> > etc \n> > \n> > Still when we get a merge conflict the file (created by git with \n> conflict \n> > markers) shows ^M in vi \n> > ie I assume its unclean line endings. \n> > \n> > Any tips what to do? \n>\n> The most important preliminary question is: how cross platform is your \n> project?\n\n\nSomewhat complex question...\nAlmost completely windows as of now.\nGood chance of starting to migrate to Linux shortly... little by little and \nwould like to minimize future headches.\n \n\n> If there is no risk of any developer working on a non-Windows platform, \n> you could simply commit CRLF and be done with it. \n>\n\nOk. So what are the (set of) settings for that?\n- MS-only project\n- No conversions any which way\nseems to be a better starting compromise than broken to start with :-)\n\n\nAs to autocrlf: I actually had some good experience with setting it to \n> `input` when working with other developers. \n>\n\n\nCan hardly claim to be expert on this but general impression I got from \nsearching the net is autocrlf is more broken than working\nand so best avoided\neg\nhttp://stackoverflow.com/questions/2333424/distributing-git-configuration-with-the-code/2354278#2354278 \n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"Git for Windows\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"264397","messageId":"d9cb6527-e137-4b55-95e6-c3d08557d905@googlegroups.com","threadId":"39678","inReplyTo":"06bed56e-b934-43e1-af1e-df1253c07dac@googlegroups.com","subject":"Re: crlf issues","fromName":"Rusi Mody","fromEmail":"rustompmody@gmail.com","sentAt":"2015-06-20T06:21:54Z","receivedAt":"2015-06-20T06:21:54Z","isPatch":false,"sender":{"key":"rustompmody@gmail.com","avatar":null},"body":"\nOn Friday, June 19, 2015 at 8:59:19 PM UTC+5:30, Rusi Mody wrote:\n>\n>\n>\n> On Friday, June 19, 2015 at 7:41:00 PM UTC+5:30, Johannes Schindelin wrote:\n>>\n>> Hi Rusi, \n>>\n>> Cc:ing the main Git list, as some of this has been discussed at the \n>> GitMerge in Paris, and some participants of that discussion might want to \n>> join this thread. \n>>   \n>> On 2015-06-19 14:55, Rusi Mody wrote: \n>> > Trying to setup git. \n>> > Majority folks are MS VS users but also some *nixers. \n>> > \n>> > My current understanding/analysis of the situation: \n>> > \n>> > 1. autocrlf is broken -- keep it false \n>> > 2. safecrlf is a cure (to some extent) -- keep it true \n>> > 3. core.eol can be left native (or is crlf on windows/lf on *nix \n>> > preferred??) \n>> > \n>> > And of course most crucial: \n>> > 4. Make sure ALL file types are covered in .gitattributes; eg \n>> > \n>> > *.txt text \n>> > *.cs text \n>> > : \n>> > : \n>> > *.pdf binary \n>> > etc \n>> > \n>> > Still when we get a merge conflict the file (created by git with \n>> conflict \n>> > markers) shows ^M in vi \n>> > ie I assume its unclean line endings. \n>> > \n>> > Any tips what to do? \n>>\n>> The most important preliminary question is: how cross platform is your \n>> project?\n>\n>\n> Somewhat complex question...\n> Almost completely windows as of now.\n> Good chance of starting to migrate to Linux shortly... little by little \n> and would like to minimize future headches.\n>  \n>\n>> If there is no risk of any developer working on a non-Windows platform, \n>> you could simply commit CRLF and be done with it. \n>>\n>\n> Ok. So what are the (set of) settings for that?\n> - MS-only project\n> - No conversions any which way\n> seems to be a better starting compromise than broken to start with :-)\n>\n>\n> As to autocrlf: I actually had some good experience with setting it to \n>> `input` when working with other developers. \n>>\n>\n>\n> Can hardly claim to be expert on this but general impression I got from \n> searching the net is autocrlf is more broken than working\n> and so best avoided\n> eg\n>\n> http://stackoverflow.com/questions/2333424/distributing-git-configuration-with-the-code/2354278#2354278 \n>\n\nI think I need to retract my complaint:\nTried a couple of times -- windows and linux.\nLinux: there was never an issue\nWindows: If the file-suffix is listed as text in .gitattributes there is no \nissue\nIf not listed then the merge-conflict marked file is messed up – ie emacs \nshows it as (Unix) with ^M on all lines except the lines with \nconflict-markers added.\n\nWhat I had earlier done different I am not quite sure...\nSo to ask again about strategy:\nThis is what seems to be working:\n- core.eol native (leave as is)\n- core.autocrlf false\n- core.safecrlf true\n- List all textish files in gitattributes (if not gitignore)\n\nWhat I miss: A 'super-safecrlf' option which would would error-out upon any \nfile not explicitly listed in gitattributes as binary or text getting added.\n\nIs there something like this?\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"Git for Windows\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"}]}