Fix regression tests on Windows when git “core.autocrlf” is set to true.
Details
- Reviewers
rnk grosbach Bigcheese - Commits
- rG4cb299407e58: [MC] Fix regression tests on Windows when git “core.autocrlf” is set to true.
rGac358137f739: [MC] Fix regression tests on Windows when git “core.autocrlf” is set to true.
rL318560: [MC] Fix regression tests on Windows when git “core.autocrlf” is set to true.
rL318528: [MC] Fix regression tests on Windows when git “core.autocrlf” is set to true.
Diff Detail
- Repository
- rL LLVM
Event Timeline
Please add a regression test that tests your code change when the repo is checked out with normal line feeds. That way we can catch regressions for this on Linux.
lib/MC/MCParser/AsmLexer.cpp | ||
---|---|---|
213 ↗ | (On Diff #121911) | This assumes the next character is '\n', which was not the case on Mac OS 9. Please check this assumption. |
616 ↗ | (On Diff #121911) | Indentation should use two spaces, not four, here and above. |
Thanks Reid. The fix doesn't have regressions on Linux, as it supports both styles of line ending ("\r\n" and "\n").
I'm sure it's possible to add regression tests that run on Linux with .gitattributes.
Thank the reviewers for your comments. I added a regression test for Linux. This solves the line ending issue for git. I would appreciate it If anyone could let me know a solution for svn.
With svn, this is controlled by svn:eol-style and svn:mime-type.
That said, we don't have to worry about any of this if you just configure your git or svn client not to mess with line endings.
Ahh sorry, I may have misunderstood your previous question. I thought we were talking about setting core.autocrlf=false at the global LLVM .gitattributes file, and then not having anything special for this one particular test.