Skip to content

Update line normalization script to turn on normalization + fix line endings #6344

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

davepagurek
Copy link
Contributor

@davepagurek davepagurek commented Aug 17, 2023

Resolves #6207

Changes:

  • text=auto marks a file for line ending normalization. Without specifying =auto, it's unspecified, so it will only be normalized if the user's settings have that on globally, so the previous .gitattributes wasn't doing anything by default. (I suspect this was on globally when people were testing the original change to .gitattributes so we didn't notice.)
  • Running git add --renormalize ., there were a few files with some different endings in the repo, so these got changed for consistency.

To test this:

  • I checked out the branch in Add support for webGL instancing #6276, where commit db5bfea is currently failing with the linter check
  • I ran git rm --cached -r .; git reset --hard to update the files in the working tree with new endings
  • I then ran npm run lint to verify that the linting check passes again

PR Checklist

  • npm run lint passes
  • [Inline documentation] is included / updated
  • [Unit tests] are included / updated

@davepagurek
Copy link
Contributor Author

@SilasVM let me know if this makes sense to you from your look into .gitattributes for the last update to the issue!

@davepagurek davepagurek force-pushed the fix/line-normalization branch from 0ee3795 to 110b72e Compare August 17, 2023 12:36
@davepagurek
Copy link
Contributor Author

Just realizing now that this issue was caused by autocrlf being turned on initially for Windows: if it was on already (not through the git config) then this change is unnecessary; if it was off on Windows, then it wouldn't be converting files. So I think this change is actually unnecessary for future changes, and the issue with that branch is that the changes were made before the .gitattributes file was added.

Anyway, all good, going to close this, sorry for the noise!

@davepagurek davepagurek deleted the fix/line-normalization branch August 20, 2023 12:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

npm test command not working in Windows OS
1 participant