sarah-walker-pcem / arculator

Arculator
http://b-em.bbcmicro.com/arculator
GNU General Public License v2.0
56 stars 23 forks source link

Mixed CRLF / LF line endings in source files #6

Open lrowe opened 3 years ago

lrowe commented 3 years ago

Minor issue, but thought I'd report since it might make some commits from those on non-Windows machines look weird. In a git checkout on Mac, I'm seeing a mix of line endings in different files, e.g.:

% file src/wx-app.cc
src/wx-app.cc: c program text, ASCII text
% file src/wx-sdl2-joystick.c
src/wx-sdl2-joystick.c: c program text, ASCII text, with CRLF line terminators

I'd guess this might be an artifact from the mercurial to git migration.

Configuring Git to handle line endings suggests setting git config --global core.autocrlf true on Windows. (I've confirmed my settings on Mac/Linux are the suggested git config --global core.autocrlf input.)

One potential option for fixing: Rewrite git history to replace all CRLF to LF?. This would break any outstanding pull requests though (workaround would be cherry-picking the individual commits.)