[PATCH] D124563: Renormalize line endings after ac5f7be6a8688955a282becf00eebc542238a86b

Aaron Puchert via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 27 17:24:37 PDT 2022


aaronpuchert added a comment.

In D124563#3478625 <https://reviews.llvm.org/D124563#3478625>, @smeenai wrote:

> I *think* this would mean that if you're on Windows and have `core.autocrlf` set to `input`, when you commit changes to this files, Git will convert them back to LF line endings. Not 100% sure of that though.

Ok, that's a good point.

In D124563#3478642 <https://reviews.llvm.org/D124563#3478642>, @modimo wrote:

> Good catch. Looking at git documentation (https://git-scm.com/docs/gitattributes#_text) by virtue of applying `* text=auto` the line endings will be stored internally as LF and then use the system settings on checkout.

How about we remove `* text=auto` for now? Or would that break something?

Perhaps we can discuss `* text=auto` on the entire code base separately.

In D124563#3478726 <https://reviews.llvm.org/D124563#3478726>, @Meinersbur wrote:

> Still don't know why Linux git doesn't do the same?

Linux checks the modified time stamp before looking at file contents. After `touch`ing the files I can also reproduce it.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D124563



More information about the cfe-commits mailing list