Darkyenus / glsl4idea

A GLSL language plugin for IntelliJ IDEA
GNU Lesser General Public License v3.0
101 stars 31 forks source link

Normalize all line endings #73

Closed AbigailBuccaneer closed 9 years ago

AbigailBuccaneer commented 9 years ago

This is very ugly, but should fix all problems with line endings. (All the files here were checked in with CRLF line endings, which upsets Git, which prefers to have LF endings internally and then convert to whatever native line endings are appropriate in the working tree.)

This follows GitHub's recommendations: https://help.github.com/articles/dealing-with-line-endings/#refreshing-a-repository-after-changing-line-endings

Again, this is ugly, but the problem will keep growing if this isn't dealt with.

An alternative solution would be to git filter-branch the whole thing, which wouldn't result in an ugly commit but would mean everybody developing on this would need to delete their local copy and get a new one (as it messes with history). Which we could do if we were to move to an organisation, and tbe at https://github.com/glsl4idea/glsl4idea :)

Darkyenus commented 9 years ago

I haven't had any problems with line endings, but normalizing them would probably be nice. I am not sure if this monster of a commit is worth it though.

Organisation... is it needed for just one repo?

I don't think that history changing would be too much of a problem, considering that we two are the only ones working on it.

AbigailBuccaneer commented 9 years ago

What platform are you working on? I've been working on Linux primarily, where Git is constantly barking at me that half the files have CRLF.

AbigailBuccaneer commented 9 years ago

Okay, after a whole bunch of trickery, my fork <AbigailBuccaneer/glsl4idea> has had the line endings normalised to LF, missing newlines at end of file added, and the .gitattributes file added to the initial commit alongside .gitignore.

Darkyenus commented 9 years ago

Git on OSX doesn't complain about that, strange. I think that if you want, you can do it here as well, it won't hurt anything, I'll pull it again. Just say when you start the magic, so I don't interfere.

AbigailBuccaneer commented 9 years ago

The magic is done!

(Sorry, I thought I commented before starting.)

Darkyenus commented 9 years ago

Thanks!