Admidio / admidio

Admidio is a free open source user management system for websites of organizations and groups. The system has a flexible role model so that it’s possible to reflect the structure and permissions of your organization.
https://www.admidio.org
GNU General Public License v2.0
336 stars 131 forks source link

Default Line Ending in Code #71

Closed sistlind closed 9 years ago

sistlind commented 9 years ago

Hi, why is this repository using Windows-Lineendings (\r\n) ? Most webservers are using linux and therefore unix-style encoding should be the default (\n)

Just an example: The downloaded config.php at setup has also \r\n leading to a file, where each second line is empty on a Linux machine.

If the repo has unix-style endings it can be easily edited by windows and unix-user, because windows-git is handling that transparently(checkout win-style, commit unix-style).

But if there is by default the windows-ending unix users have often the problem with ^M chars at commits/diffs.

Best regards Stefan

ximex commented 9 years ago

i also prefer \n :+1:

Fasse commented 9 years ago

This is/was because most of the users have windows machines and therefore the line ending was set to windows so users have no problem to edit files.

sistlind commented 9 years ago

Is this a problem at IIS or apache for win? If not, i see not really a problem for windows users, because nowadays every serious editor can handle \n (e.g. notepad++, eclipse or wordpad :) )

Furthermore, developers can use the "check out windows style commit unix-style" at git and the releases can released for unix & windows separately.

ximex commented 9 years ago

@Fasse do you know the "windows/unix checkout" function?

ximex commented 9 years ago

@Fasse @sirnone @thomas-rcv what is your preference?

sirnone commented 9 years ago

for me it makes no difference - most of the time i work on an windows system... but git can handle this by settings: https://help.github.com/articles/dealing-with-line-endings/

Fasse commented 9 years ago

ok, we can change it. If there will be problems later (maybe our users have problems with it) we can change it back.

thomas-rcv commented 9 years ago

I only work with window system. But I don't care if there are no conflicts in future

ximex commented 9 years ago

done: https://github.com/Admidio/admidio/commit/878a57e0417d46f08ae8cfbddfd6072041548f06, https://github.com/Admidio/admidio/commit/765204d8ee3325d88c8cee8befdc000f7e980ef3 hopefully this was correct. I did it with the instructions from: https://help.github.com/articles/dealing-with-line-endings/

could get closed if someone check if it works correctly

ximex commented 9 years ago

i think all worked corret