Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
ddephor44467yYes, it sucks.
For git you can configure how to treat it (change, keep, ignore).
But so many tools depend on the right line endings, it's a PITA -
2erXre524957y@ddephor I know that setting auto.crlf will help in that case, but sometimes it will simply not work as expected. We had an issue that someone was editing and committing directly from gitlab. And 💥 there was a CRLF right in the repo which should contain only LF.. WTF?!
-
ganey957yYeah, my windows git is set to always commit Linux style line endings. Sometimes a file will end up with doubled up line spacings, but it's quite rare
-
ddephor44467y@2erXre5 Either setting to change line endings may not help you at all. If you're lucky, you can control the line endings of you're project, but often you're doing things for several systems and then the only setting is keep line endings as-is and fiddle with the other tools.
Biggest problem are human failures. I've seen people using only windows and still managing to commit some LF here and there. However they did that, it fucks up everything.
Best would be to automatically correct line endings before commit, but that won't go fully automatic in every case so in the end it's still the responsibility of the developer. So we're screwed furthermore... -
2erXre524957y@ddephor it is as you say, and that's exactly my rant: why do we still have to think about the line endings? It would me much more pleasant when every dev would just ignore that there are different kinds of them 😏
Related Rants
Why the f*** was the computer industry not able to contract to common line endings? The trouble started many years ago when I was coding scripts on my Windows machine and they were not every time able to run on a Linux machine. Well I then somehow learned on the hard tour that this is due to wrong line endings. Thought that might be the last time I've seen such problems in my career...
And 10 years later I was going to migrate from CVS and SVN to git, and BAM: the f****** line endings appears to be causing much more problems than in all the ten years before. Why? I ask why is this still necessary in 2017 that a dev has to think about the line endings anymore?? This is so 1991!!!
undefined
git
line endings
auto.crlf
wk67