On Fri, 2016-01-15 at 23:47 +0100, Jochen Theodorou wrote: > […] > I am working on Groovy for several years now, and 90% of the time, > this > was on a linux system. Still I have seen new files from me with \r\n > line endings. I do not really know why that is. I would be all for > the
Someone used a Windows machine to commit (many) files which have \r\n line endings. Linux person checks the files out, they have \r\n line endings. This has been a ####### pain for me for years, so much so I stopped even looking at the Groovy source code with a view to editing it. > feature, if it would mean to force it for new files.... From a few I > know they have been from having to do work on a laptop, and those > stupid > things run so bad with linux all the time.... my current one is such > a > good example for this... well... I am going off track here Most of your problems are likely related to which editor you are using. Emacs does at least recognize DOS line endings and work accordingly. The core difficulty is that some files have \n line endings and other have \r\n line endings. To me, this is an unacceptable state of affairs. Given this is a Git repository, all line endings in all files should be \n. No ifs, no buts, no mewling from Windows people, no worrying about changing 400 files and the gross silliness of the resultant commit logs. > if two more people say they prefer forcing this line ending and > producing a gigantic commit, to overwrite hundreds of files (with > ignore > whitespace you can at least make sure there is no new logic).... then > I > will give up my position. I think you should. Consistency of the repository far outweighs any stupidness of a monster line endings commit. Currently some files have \n and others \r\n, this means the repository is broken. No pull request with \r\n line endings should be acceptable. No commits from committers with \r\n line endings should be acceptable. Windows users need to read about and act upon the git property core.autocrlf before cloning the Groovy (or in fact any Git) repository, and most especially before making a pull request or pushing. I have just had to deal with this with another Git repository and a Mercurial one… -- Russel. ============================================================================= Dr Russel Winder t: +44 20 7585 2200 voip: sip:russel.win...@ekiga.net 41 Buckmaster Road m: +44 7770 465 077 xmpp: rus...@winder.org.uk London SW11 1EN, UK w: www.russel.org.uk skype: russel_winder
signature.asc
Description: This is a digitally signed message part