The current Git configuration instructions for chromium on Windwos <https://chromium.googlesource.com/chromium/src/+/master/docs/windows_build_instructions.md#get-the-code> explicitly specify autocrlf=false.
This setting makes it possible, even probable, that developers will accidentally commit files with CRLFs rather than LFs. There are several reasons for this to happen, primarily that the developer copied text from tools that changes LFs to CRLFs, or that new files created by Visual Studio (and AFAICT Eclipse) will *always* use CRLFs, unless special manual steps are taken to correct this situation.
Changing the setting to true is not likely not to be recommended, since that would force all text files to be checked out with CRLF and that have, in my experience, caused trouble with some tools that have required LFs in their input files.
Among the downsides of not having a forced LF checkin/checkout configuration, and a subsequent accidental mixed use of LF and CRLF EOLs, is that some tools, e.g Visual Studio, will open dialogs when they detect mixed CRLF/LF EOL characters in a file. It is also possible that editors on other platforms display the CR character in a very visible form as "^M" (this includes at least vi), and at Vivaldi we are using a code review tool, Critic, that marks the CR character as "^M" on a red background.
Updating the git attributes settings file to list source extensions and specify "test eol=lf" for each will force all commits of such files to be made with LFs; any CRLFs will be automatically converted when the file is staged, or committed.
Before git attributes all files that currently have CRLFs in them need to be either fixed so that they only use LFs, or, if they actually need to be checked in with CRLFs (usually test files) they need to be protected with specific git attribute file entries designating them as either "binary" or "-text".
Phase 1: Cleaning files with CRLFs (Current CLs)
(Merged) https://chromium-review.googlesource.com/c/chromium/src/+/940139
(Merged) https://chromium-review.googlesource.com/c/chromium/src/+/1007642
(Main fix CL) https://chromium-review.googlesource.com/c/chromium/src/+/993812
https://chromium-review.googlesource.com/c/chromium/src/+/1007764
The Main fix CL (993812) fixes CRLFs in the files that were discovered when changing the gitattributes file to the list in the 993952 CL below.
Phase 2: Updating the top gitattribute file
https://chromium-review.googlesource.com/c/chromium/src/+/993952
This CL also have fixes for CRLFs in files that have been committed since the CL was initially uploaded
Comment 1 by asanka@chromium.org
, Jun 4 2018