Line endings, tests and python scripts

Hi Team,

Currently the "getting started" documentation recommends that Windows
users check out the repository from github with unix line endings in
order that tests don't spuriously fail. As a Windows developer, this
doesn't cause me any problems.

See <>, "Getting the Source
Code and Building LLVM": "Or, on windows, git clone --config

See <>, "Using Visual Studio":
"If you're using git on Windows, make sure your core.autocrlf setting
is false."

However, python likes to always write out text files with native line
endings by default. This does cause me problems :). In particular,
there are some scripts like clang-tools-extra/clang-tidy/
that modify files. When you run these scripts, they cause the entire
contents of the file to be marked as changed because it flips all the
line endings from LF to CRLF. I worked around this in my local tree
to avoid the spurious diffs when I run and I opened a
bug on it <>.

However, it occurs to me that this is worth some wider discussion than
just comments on that particular bug as I was reviewing
<> "fix check-clang-tools tests that
fail due to Windows CRLF ine endings" which is essentially another
side-effect of the same issue.

Should scripts and tests be written to assume LF line endings
everywhere since this is the guidance on the "getting started" pages?


-- Richard