From: Lieven H. <li...@li...> - 2013-11-07 11:10:02
|
Hi Kevin, I don't see the problem with the single commit to fix the line endings that you describe as a downside. Why does this mess up the commit history? For the affected files there will be an extra entry in the commit log telling we fixed the line endings... Which is exactly what we should do to improve the quality of the codebase. Green light for me to apply the change too! And to add a .gitattributes file to the repo that enforces all users to use the same line ending convention (LF only in the repo and autoconversion to the correct platform line endings on cloning). Kind regards, Lieven. On Thu, Nov 7, 2013 at 12:36 AM, Kevin Robert Keegan <ke...@kr...>wrote: > This is a mundane topic, but our decision on how to proceed could have a > big impact on MisterHouse. So please read and comment on this if you have > something to say. > > The current MisterHouse code base is currently a mix of both CRLF and LF > line endings. Some files even contain both CRLF and LF interspersed > throughout the file. > > Mixing line endings can cause it to appear that a line has been edited > when in fact nothing has happened. Indeed, I recently ran into a file > which contained a mix of both CRLF and LF, my editor really dislikes this > and tried to pick a single line ending format for the entire file. This > lead to multiple "false changes." > > I want to be clear, changing the line endings will have no effect on the > functionality of MisterHouse. > > Going forward we have two options as I see it: > > 1. Do nothing. We continue to permit ANY line ending to be used in > MisterHouse. I believe this action is considered "sloppy" by most > programmers. This would also likely lead to a number of "false changes" in > the future as the line endings bounce back and forth. Those committing > files can take steps to avoid such "false changes" but I am sure these > steps will be missed sometimes. I also wonder if mixed use could lead to > more frequent commit conflicts, this is pure speculation on my part. > > 2. Convert to using LF. This would be a mostly transparent conversion. > Git can be instructed to automatically convert CRLF to LF, simultaneously > git can also automatically convert LF files to CRLF files in the working > directory of windows git users. The major downside to this plan is that it > would require a single large commit to convert all CRLF files to LF. Each > affected line would appear to be modified. In some cases this would make > it look like the entire file was changed. This would make a mess out of > the commit history. A list of the affected files is at the end of this > email. > > My opinion. I am somewhat disheartened that we even have to make this > decision. Neither option seems particularly appealing to me. That said, I > would chose to convert to using LF by a slight margin. > > Kevin > > > > Files that use CRLF at least once and would be modified by a conversion: > > # modified: bin/xAP-speech.pl > # modified: code/common/cm11_control.pl > # modified: code/common/cm11_monitor.pl > # modified: code/common/dvd_player.pl > # modified: code/common/email_marketplace_sales.pl > # modified: code/common/froggyrita.pl > # modified: code/common/holiday_ical.pl > # modified: code/common/mp3_dj.pl > # modified: code/examples/iButton_weather_station.pl > # modified: code/examples/network_items_web.pl > # modified: code/examples/test_weather_item.pl > # modified: code/public/Brian/flagreminders.pl > # modified: code/public/Brian/grlevel3.pl > # modified: code/public/Brian/klier.mht > # modified: code/public/Brian/old stuff i don't use anymore/ > calllog.pl > # modified: code/public/Brian/old stuff i don't use anymore/ > callog.pl > # modified: code/public/Brian/old stuff i don't use anymore/ > radar.pl > # modified: code/public/Brian/old stuff i don't use anymore/ > tk_frames.pl > # modified: code/public/Brian/old stuff i don't use anymore/ > tk_widgets.pl > # modified: code/public/Brian/old stuff i don't use anymore/ > tracking.pl > # modified: code/public/Brian/phonestuff.pl > # modified: code/public/Brian/radar-wx.pl > # modified: code/public/Brian/stormwarning.pl > # modified: code/public/Brian/xpl.pl > # modified: code/public/Esensor_EM01.pl > # modified: code/public/Ricardo/code/tv_com.pl > # modified: code/public/hvac_upb_thermostat.pl > # modified: docs/faq.pod > # modified: lib/Insteon.pm > # modified: lib/Insteon/AllLinkDatabase.pm > # modified: lib/Insteon/BaseInsteon.pm > # modified: lib/Insteon/BaseInterface.pm > # modified: lib/Insteon/Controller.pm > # modified: lib/Insteon/Irrigation.pm > # modified: lib/Insteon/Lighting.pm > # modified: lib/Insteon/Message.pm > # modified: lib/Insteon/MessageDecoder.pm > # modified: lib/Insteon/MessageDecoder_test.pl > # modified: lib/Insteon/PLMTerminal.pl > # modified: lib/Insteon_PLM.pm > # modified: lib/Weather_davisvantageproii.pm > # modified: lib/X10_RF_rfxsensor.pm > # modified: lib/ajax.pm > # modified: lib/site/MSN.pm > # modified: lib/site/Tk/CursorControl.pm > # modified: lib/site/Tk/ToolBar.pm > # modified: lib/site/Win32/TieRegistry.pm > # modified: lib/site_win50/Win32/Registry.pm > # modified: lib/site_win50/Win32API/Registry.pm > # modified: lib/site_win56/Win32/Registry.pm > # modified: lib/site_win56/Win32API/Registry.pm > # modified: lib/site_win58/Win32/Registry.pm > # modified: lib/site_win58/Win32API/Registry.pm > # modified: lib/xPL_Items.pm > # modified: web/newclock/alarm.pl > # modified: web/newclock/index.pl > > > > ------------------------------------------------------------------------------ > November Webinars for C, C++, Fortran Developers > Accelerate application performance with scalable programming models. > Explore > techniques for threading, error checking, porting, and tuning. Get the most > from the latest Intel processors and coprocessors. See abstracts and > register > http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk > ________________________________________________________ > To unsubscribe from this list, go to: > http://sourceforge.net/mail/?group_id=1365 > > > |