Closed apolkingg8 closed 3 years ago
I guess the EOL git diff issue is because we didn't have Nx format:write
in git hook before, so the file EOL can be CRLF or CR. But I'm not really sure because as far as I know the EOL change would not be committed into git.
Ok, but before merging we need to figure out the reason and fix it. It's not sustainable to rewrite entire files in a feature PR, it makes it almost impossible to review.
I don't think the Nx format command is doing this since I can't reproduce locally, if so it's an Nx windows bug. Are you sure the git commit hook for EOL is working correctly? I think it's more likely this is an editor issue.
When I run Nx format:write --all
, I can see 288+ files modified and all of them are EOL changes. If a file changes only EOL, it will not be shown in git diff, but if a file changes both EOL and content, it will cause a "whole file change" issue.
Just add .gitattributes
to make sure all text files in git are LF, but I'm not sure how git shows the file diff when A and A' have different EOL. It's about existing files and I never open them so I don't think it's about my editor.
Hm, that's strange. Thanks for fixing, we can keep an eye on it in the future.
:tada: This PR is included in version 1.3.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:
Close #175