mrkite / TerraFirma

Mapping for Terraria
http://seancode.com/terrafirma
BSD 2-Clause "Simplified" License
278 stars 61 forks source link

Cross-platform end-of-line normalization #38

Closed mojotx closed 8 years ago

mojotx commented 8 years ago

I use TerraFirma on my Mac and Linux desktops, and I'm not a Windows guy at all. I noticed that some files have been checked in recently with MS-DOS CRLF line endings. I could just convert them to LF format, but that makes merging upstream changes tedious.

Thankfully Git makes it easy to auto-convert, depending on your platform, although it does require creating a .gitattributes file and/or setting the core.autocrlf attribute to true if you're a Windows person, or input if you're a Mac/UNIX person.

Example:

# Mac or UNIX
git config --global core.autocrlf input

# Windows
git config --global core.autocrlf true

The .gitattributes file can be used for people who have not explicitly set the core.autocrlf attribute in their Git config.

I'm about to submit a pull request that will hopefully address this issue. This StackOverflow question was very useful in figuring this out.

mojotx commented 8 years ago

Pull request submitted. 🙂

https://github.com/mrkite/TerraFirma/pull/39

mrkite commented 8 years ago

Thanks.