[PATCH] D124563: Drop '* text=auto' from .gitattributes and normalize
Aaron Puchert via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 28 05:19:04 PDT 2022
aaronpuchert added a comment.
In D124563#3479373 <https://reviews.llvm.org/D124563#3479373>, @nikic wrote:
> This change seems to have broken switching to a branch before the commit completely. The only way I was able to recover my git checkout is to comment out the `* text=auto` line and then run `git reset --hard`, otherwise the crlf.cpp files always show up as changed.
We discussed this previously, there is no way to fix that now. We should have normalized in the same change that added the `.gitattributes`. Any checkout between those two changes will now show bogus modified files. Sometimes it happens to work out because Git apparently looks at file time stamps before checking the contents, so it doesn't see an issue with those files. But if you `touch` them they will again show up as modified.
In D124563#3479405 <https://reviews.llvm.org/D124563#3479405>, @MForster wrote:
> It also seems weird to me that a file that relies on CRLF line endings is checked in explicitly with LF line endings. A better approach IMHO would be to check it in as binary.
These are all text files though, not binaries. Checking it in as binary will not show any diffs.
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
More information about the cfe-commits