Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unify CRLF for repo #5128

Open
th-joerger opened this issue Mar 17, 2023 · 4 comments
Open

Unify CRLF for repo #5128

th-joerger opened this issue Mar 17, 2023 · 4 comments

Comments

@th-joerger
Copy link
Contributor

Summary

Change all line endings to lf upstream. This is the requirement stated in the .editorconfig file anyways.

Motivation

My work for #5127 was made difficult by diverging CRLF settings of files in the repo. I would suggest to fix the upstream linebreak settings of all files and use git config core.autcrlf true locally.

Additional context

Output of git ls-files --eol | grep -v -E '^(i\/lf|i\/none|i\/-text)'

i/      w/      attr/                   .env
i/crlf  w/crlf  attr/                   data/Dockerfiles/dovecot/supervisord.conf
i/crlf  w/crlf  attr/                   data/Dockerfiles/netfilter/server.py
i/crlf  w/crlf  attr/                   data/conf/dovecot/dovecot.folders.conf
i/crlf  w/crlf  attr/                   data/conf/rspamd/dynmaps/aliasexp.php
i/crlf  w/crlf  attr/                   data/conf/rspamd/dynmaps/bcc.php
i/crlf  w/crlf  attr/                   data/conf/rspamd/dynmaps/settings.php
i/crlf  w/crlf  attr/                   data/conf/rspamd/meta_exporter/pipe.php
i/crlf  w/crlf  attr/                   data/conf/rspamd/meta_exporter/pipe_rl.php
i/crlf  w/crlf  attr/                   data/conf/rspamd/meta_exporter/pushover.php
i/crlf  w/crlf  attr/                   data/conf/sogo/plist_ldap
i/mixed w/mixed attr/                   data/web/css/build/003-bootstrap-select.css
i/crlf  w/crlf  attr/                   data/web/css/build/014-mailcow.css
i/crlf  w/crlf  attr/                   data/web/css/site/admin.css
i/crlf  w/crlf  attr/                   data/web/css/site/debug.css
i/crlf  w/crlf  attr/                   data/web/css/site/edit.css
i/crlf  w/crlf  attr/                   data/web/css/site/index.css
i/crlf  w/crlf  attr/                   data/web/css/site/mailbox.css
i/crlf  w/crlf  attr/                   data/web/css/site/user.css
i/crlf  w/crlf  attr/                   data/web/inc/ajax/container_ctrl.php
i/crlf  w/crlf  attr/                   data/web/inc/ajax/destroy_tfa_auth.php
i/crlf  w/crlf  attr/                   data/web/inc/ajax/qitem_details.php
i/crlf  w/crlf  attr/                   data/web/inc/ajax/qr_gen.php
i/crlf  w/crlf  attr/                   data/web/inc/ajax/show_rspamd_global_filters.php
i/crlf  w/crlf  attr/                   data/web/inc/ajax/sieve_validation.php
i/crlf  w/crlf  attr/                   data/web/inc/ajax/syncjob_logs.php
i/crlf  w/crlf  attr/                   data/web/inc/ajax/transport_check.php
i/crlf  w/crlf  attr/                   data/web/inc/functions.acl.inc.php
i/crlf  w/crlf  attr/                   data/web/inc/functions.address_rewriting.inc.php
i/crlf  w/crlf  attr/                   data/web/inc/functions.admin.inc.php
i/crlf  w/crlf  attr/                   data/web/inc/functions.app_passwd.inc.php
i/crlf  w/crlf  attr/                   data/web/inc/functions.customize.inc.php
i/crlf  w/crlf  attr/                   data/web/inc/functions.dkim.inc.php
i/crlf  w/crlf  attr/                   data/web/inc/functions.docker.inc.php
i/crlf  w/crlf  attr/                   data/web/inc/functions.fail2ban.inc.php
i/crlf  w/crlf  attr/                   data/web/inc/functions.fwdhost.inc.php
i/crlf  w/crlf  attr/                   data/web/inc/functions.inc.php
i/crlf  w/crlf  attr/                   data/web/inc/functions.mailbox.inc.php
i/crlf  w/crlf  attr/                   data/web/inc/functions.mailq.inc.php
i/crlf  w/crlf  attr/                   data/web/inc/functions.oauth2.inc.php
i/crlf  w/crlf  attr/                   data/web/inc/functions.policy.inc.php
i/crlf  w/crlf  attr/                   data/web/inc/functions.pushover.inc.php
i/crlf  w/crlf  attr/                   data/web/inc/functions.quarantine.inc.php
i/crlf  w/crlf  attr/                   data/web/inc/functions.quota_notification.inc.php
i/crlf  w/crlf  attr/                   data/web/inc/functions.ratelimit.inc.php
i/crlf  w/crlf  attr/                   data/web/inc/functions.rspamd.inc.php
i/crlf  w/crlf  attr/                   data/web/inc/functions.tls_policy_maps.inc.php
i/crlf  w/crlf  attr/                   data/web/inc/functions.transports.inc.php
i/crlf  w/crlf  attr/                   data/web/inc/lib/WebAuthn/rootCertificates/huawei.pem
i/crlf  w/crlf  attr/                   data/web/inc/lib/vendor/soundasleep/html2text/tests/anchors.html
i/crlf  w/crlf  attr/                   data/web/inc/lib/vendor/soundasleep/html2text/tests/basic.html
i/crlf  w/crlf  attr/                   data/web/inc/lib/vendor/soundasleep/html2text/tests/table.html
i/crlf  w/crlf  attr/                   data/web/inc/lib/vendor/soundasleep/html2text/tests/test3.txt
i/crlf  w/crlf  attr/                   data/web/inc/lib/vendor/soundasleep/html2text/tests/test4.txt
i/      w/      attr/                   data/web/inc/lib/vendor/yubico/u2flib-server/README.adoc
i/crlf  w/crlf  attr/                   data/web/js/build/006-formcache.min.js
i/crlf  w/crlf  attr/                   data/web/js/build/009-numberedtextarea.min.js
i/crlf  w/crlf  attr/                   data/web/js/build/011-api.js
i/mixed w/mixed attr/                   data/web/json_api.php
i/crlf  w/crlf  attr/                   data/web/oauth/profile.php
i/crlf  w/crlf  attr/                   data/web/oauth/token.php
@MAGICCC
Copy link
Member

MAGICCC commented Mar 17, 2023

Also somewhat related to #3129

@th-joerger
Copy link
Contributor Author

Yes. It is also a very quick fix.

@MAGICCC
Copy link
Member

MAGICCC commented Mar 17, 2023

Indeed, but question is if crlf or lf, this was a discussion in one of the PRs linked in my issue

@th-joerger
Copy link
Contributor Author

As most of the code is most of the times run on Linux (which uses LF), most of the repo is already LF, and LF being the de-facto standard in most larger git repos, I think the only sensible choice is LF.

When checking out on windows, core.autocrlf true is handling all problems completely frictionless. Having some files in CRLF, and some even with MIXED line endings is literally the worst state a code base can be in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants