SpiritQuaddicted / reQuiem

reQuiem is a custom OpenGL Quake engine for Windows and Linux. It's designed for maximum compatibility with all things Quake - past, present and future. It's fast, reliable, and easy to configure. In short: it fixes what was broken, improves what needed improving, and leaves the rest alone. It was developed by jdhack.
GNU General Public License v2.0
17 stars 2 forks source link

linefeed normalization #38

Closed neogeographica closed 10 years ago

neogeographica commented 10 years ago

WARNING: after I merge this pull request to the master branch, it would be a good idea to delete any local copy you might have of the repo, and re-clone it from GitHub. If you don't have any local changes, this is by far the easiest way to ensure you won't have any problems.

If you do have some changes, email me & we'll talk. :-)

OK here's what's up. This pull request does two things:

With these conditions in place, when you check out a file, Git should therefore see that it is a "text file" that has normalized line endings. What it does with the file's linefeeds at that point depend on how your .gitconfig is set up.

By default, your core.eol config property should be unset (which is the same as being set to "native"), which tells Git to use the style of linefeeds that is native to your platform. So if you're on Linux, you should get text files that have Unix-style linefeeds, and on Windows you should get Windows-style linefeeds (CRLF).

When you check a file back into the repo, it will arrive in the repo with normalized line endings still, regardless of whether you are committing from Linux or Windows.

Reference: http://adaptivepatchwork.com/2012/03/01/mind-the-end-of-your-line/ (and ignore the part about "The Old System")