-
-
Notifications
You must be signed in to change notification settings - Fork 476
added gitattributes to disable autocrlf, addressing issue #1234 #1238
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
Conversation
Should this be more focused and specify the file extensions that should be treated as text and binary?
might treat everything as text including png, jpeg and other binary files. |
… for example js files
That makes sense, I just pushed a new commit, targeting only .js files in data/examples, will it need to be more specific than that? |
What about any binary file formats like jpeg, gif, mov? |
Wouldn't binary files be unaffected by this? From what I understand, git should be able to detect whether or not a file should be treated as binary, at least how I understand the discussion here. |
I'd want to be more explicit and not leave anything to chance. I might just paranoid. Give it a try and see if anything gets broken. |
That's fair! Just updated the PR with a more explicit list of binary files. |
I did a scan of the p5.js-website git repo and got the following file extensions, separated by text and binary. You could just include the binary files. Mainly adding the ogg, ogv and font files, otf and ttf Cascading Style Sheetcss text eol=lf Comma Separated Valuecsv text eol=lf Embedded JavaScript template fileejs text eol=lf ESLint configuration fileeslintrc text eol=lf WebGL Fragment Shader filefrag text eol=lf Some file that deals with translationsftl text eol=lf Handlebars template system filehbs text eol=lf Hyper Text Markup Language filehtml text eol=lf JavaScript source filejs text eol=lf JavaScript Object Notation filejson text eol=lf CSS mapmap text eol=lf Narkdown markup filemd text eol=lf 3D modei fileobj text eol=lf PHP source filephp text eol=lf Scalable Vector Graphics image filesvg text eol=lf Tom's Obvious, Minimal Language filetoml text eol=lf Text filetxt text eol=lf WebGL Vertex Shader filevert text eol=lf Extensible Markup Language filexml text eol=lf YAML Ain't Markup Language fileyml text eol=lf Adobe Illustrator file formatai binary Graphics Interchange Format filegif binary Windows Icon Image fileico binary Joint Photgraphic Experts Group image filejpg binary QuickTime media file containermov binary MP3 audio filemp3 binary MP4 media file containermp4 binary OGG media file containerogg binary OGG video file containerogv binary OpenType font fileotf binary Portable Document Format filepdf binary Portable Network Grpahics image filepng binary Truetype font filettf binary Waveform Audio File Format audio filewav binary WebM media filewebm binary ZIP archive filezip binary |
@aceslowman For a final check locally, you can try to normalize using the rules you just set and see if there are any unexpected changes: https://docs.github.com/en/get-started/getting-started-with-git/configuring-git-to-handle-line-endings#refreshing-a-repository-after-changing-line-endings After that we can merge this. 😄 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! Built this on my mac and verified sketches on examples and reference pages still run. I don't have access to a Windows machine, but will take Austin's word for it!
@aceslowman can you try running the process that @limzykenneth suggested to check for errors? thanks! https://docs.github.com/en/get-started/getting-started-with-git/configuring-git-to-handle-line-endings#refreshing-a-repository-after-changing-line-endings (if I've merged too hastily let me know, and I can revert!) |
@kjhollen @limzykenneth Just went through the process! It all works on my end, I ran watch at the end and can navigate all areas of the site. '--renormalize' did leave me with some modified files though, should those be pushed as well? |
I think so—then they won't repeatedly show as modified for other contributors. Sounds like it's also a good opportunity to make sure that the remaining changed files are text files. |
@kjhollen It appears that all of the files that were modified were text files, I've pushed a commit to the branch! processing/p5.js-website@main...aceslowman:p5.js-website:gitattributesFix |
Fixes/addresses #1234 (also #430)
Changes:
I've added a .gitattributes file that disables git autocrlf on the repository. On Windows, git will convert LF to CRLF on checkout, which breaks findName() in the build script. Hopefully this will make this problem less likely to come back up for those on Windows.