AndlyticsProject / andlytics

Google Play - Android Market statistics app
Other
537 stars 181 forks source link

Convert line endings from CRLF to LF. #672

Closed johnjohndoe closed 8 years ago

johnjohndoe commented 9 years ago

Please do not commit files with Windows line endings (CRLF) since this causes a permanent full-fill-diff on *nix machines. The Git config can be setup to automatically convert line endings back and forth on a Windows machine.

johnjohndoe commented 9 years ago

Rebased onto dev.

johnjohndoe commented 9 years ago

Formatting and whitespace issues are some of the more frustrating and subtle problems that many developers encounter when collaborating, especially cross-platform. It’s very easy for patches or other collaborated work to introduce subtle whitespace changes because editors silently introduce them, and if your files ever touch a Windows system, their line endings might be replaced. Git has a few configuration options to help with these issues.

core.autocrlf

If you’re programming on Windows and working with people who are not (or vice-versa), you’ll probably run into line-ending issues at some point. This is because Windows uses both a carriage-return character and a linefeed character for newlines in its files, whereas Mac and Linux systems use only the linefeed character. This is a subtle but incredibly annoying fact of cross-platform work; many editors on Windows silently replace existing LF-style line endings with CRLF, or insert both line-ending characters when the user hits the enter key.

Git can handle this by auto-converting CRLF line endings into LF when you add a file to the index, and vice versa when it checks out code onto your filesystem ...

Source: Git documentation - Configuration - Formatting-and-Whitespace