Patch #44330
openConvert three CRLF files to LF
Description
I am one of the Debian Developers working on maintaining Redmine in Debian. I noticed that there are three files in the codebase with CRLF (Carriage Return, Line Feed) line endings, which is the Windows standard for line terminations in text files. All of the rest of the text files in the Redmine codebase use LF (Line Feed) line endings, the Linux standard.
Generally, it is recommended that files in a repository use LF line endings. Many repository clients, like git, default to automatically converting CRLF to LF when uploading to a repository. In most cases, there is no downside to having all text files use LF. The only exception I have encountered is when a standard requires CRLF (like IMAP) and test files need to be formatted that way to verify correct output.
The three files in Redmine that have CRLF line endings are:
test/fixtures/files/2006/07/060719210727_changeset_utf8.diff test/fixtures/files/2019/04/190430092344_redmine_logo.ai.unknown test/fixtures/files/testfile.txt
In reviewing these files, there does not appear to be any reason why they would need to be CRLF. My guess is they were uploaded by someone whose client was set to not automatically convert CRLF to LF.
In the Debian packaging workflow we are using, the code is checked in and out of a git repository various times as the package is built and tested. At some points, the contents of the code is checked against the upstream tarball to make sure that no files have changed. Because git with default settings converts CRLF to LF, these three files are flagged as having changed. If there is no downside to the project in doing so, I think it would be preferable to convert these files to LF. If for some reason these files do need to be CRLF, I have a way of working around that in the Debian packaging.
Attached is a patch that converts these files to LF. It was generated by simply running dos2unix on each file.
Files
No data to display