-
-
Notifications
You must be signed in to change notification settings - Fork 6
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
.gitattributes: substitute CRLF only in text files #1700
Conversation
Changing CRLF to LF makes sense for text files, but not images, where doing so can lead to file corruption. This commit tells Git to ignore binary files and only do the substitution in plain text files. Fixes hydephp/hyde#239.
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.
Hey! Thanks for the PR!
Could you confirm that this does indeed resolve issues with binary files, whilst also performing CRLF to LF normalization on all text files, including things like .md
, .php
, .blade.php
, etc?
Okay, double checked with ChatGPT and it seems like I have indeed been at fault here. Thank you so much for making this PR! I'm gonna go ahead and merge this, and I'll also go over all the gitattribute files in the organization to make sure we do this properly.
|
Thanks for the merge. Regardless, I did testing as you said... Okay, so I created a new project with
I then changed the
By the way, thank you for this lovely static site generator! |
Thank you so much for testing it!
Awesome, that's just what I want. Since I do a lot of my development on a Windows machine I want to normalize text files (like Blade files for example) but I obviously don't want that to happen to binary files.
Thank you for the kind words and all your help debugging and patching this issue! |
Changing CRLF to LF makes sense for text files, but not images, where doing so can lead to file corruption. This commit tells Git to ignore binary files and only do the substitution in plain text files.
Fixes hydephp/hyde#239.