Use unifor line endings in the repo
Every Git repository needs to use \n, also known as line feed characters, for its line endings in every text file in the repository, or else there will be problems with merges and/or plain-text patches. The issue is outlined in more detail in the GitHub help pages.
As you all know, Windows uses \r\n instead for its line endings (carriage return + line feed), and it seems like Maxime hasn't thought about this issue when committing, so the majority (but not all!) of the files in the repository now use the Windows-style line endings. I stumbled upon this fact when:
1. Emacs complained about it ("DOS emulation mode for Git repository").
2. Kate complained about it (Incessant "Do you want to convert this DOS text file?" questions).
3. Git-Flow complained about it (Failed to do a feature branch merge).
4. Git-Gui complained about it (There were ^M warnings all over the place).
The fix for this is simple:
1. Maxime and other Windows-users need to issue the command git config --global core.autocrlf true so that files get \r\nendings when they are checked out, and get \n endings again when they are committed back in.
2. I've made a commit that fixes the issue in dflemstr/Squeryl@e13339c. It looks like every file in the repository has been completely rewritten, but it's only the line endings that are changing. I didn't want to push this to max-l's repository yet, since he hasn't activated auto-CRLF conversion yet.
3. People who have created forks of the repository should pull in this new change as soon as possible, so that they don't make changes that also use CRLF-endings (because most editors will continue to use CRLF-endings if they open a file with CRLF-endings)
4. From time to time, a check should be made that no more CRLF endings have crept in. I could do that until further notice.
As you all know, Windows uses \r\n instead for its line endings (carriage return + line feed), and it seems like Maxime hasn't thought about this issue when committing, so the majority (but not all!) of the files in the repository now use the Windows-style line endings. I stumbled upon this fact when:
1. Emacs complained about it ("DOS emulation mode for Git repository").
2. Kate complained about it (Incessant "Do you want to convert this DOS text file?" questions).
3. Git-Flow complained about it (Failed to do a feature branch merge).
4. Git-Gui complained about it (There were ^M warnings all over the place).
The fix for this is simple:
1. Maxime and other Windows-users need to issue the command git config --global core.autocrlf true so that files get \r\nendings when they are checked out, and get \n endings again when they are committed back in.
2. I've made a commit that fixes the issue in dflemstr/Squeryl@e13339c. It looks like every file in the repository has been completely rewritten, but it's only the line endings that are changing. I didn't want to push this to max-l's repository yet, since he hasn't activated auto-CRLF conversion yet.
3. People who have created forks of the repository should pull in this new change as soon as possible, so that they don't make changes that also use CRLF-endings (because most editors will continue to use CRLF-endings if they open a file with CRLF-endings)
4. From time to time, a check should be made that no more CRLF endings have crept in. I could do that until further notice.
Leave a comment