[PATCH] D124606: Use `-text` git attribute instead of `text eol=...'

Pavel Labath via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 28 08:37:43 PDT 2022


labath added a comment.

In D124606#3480164 <https://reviews.llvm.org/D124606#3480164>, @aaronpuchert wrote:

> Fair enough, but don't we want to enforce LF or CRLF, respectively?

Sure, but is the version control system the right tool to do that? I think it'd be better to have the test itself confirm the consistency of the data (or convert it into the right format at runtime) and not rely on magical conversions within the VC tool.

> An editor could inadvertently change the line endings, and someone might not notice before committing.

>From what I understood, most of these tests would immediately break (due to hardcoded offsets) if the line endings were changed.

In D124606#3480187 <https://reviews.llvm.org/D124606#3480187>, @aaronpuchert wrote:

> Also I still don't understand what specifically this is fixing. What exactly was wrong about the previous configuration?

The branch switching issue (discussed in D124563 <https://reviews.llvm.org/D124563>) is one. We also ran into problems when importing this into our version control system (as it did not do the .gitattributes conversion) -- although one could say that is not an upstream problem...


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D124606/new/

https://reviews.llvm.org/D124606



More information about the cfe-commits mailing list