-
Notifications
You must be signed in to change notification settings - Fork 83.1k
[Global/macOS] Prevent corruption of "Icon\r" rule #3523
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
base: main
Are you sure you want to change the base?
Conversation
Online editor (GitHub, CodeMirror editor) test. github#3523
Bump |
Unfortunately, I can report that at least one relatively popular tool doesn't handle this well either. I just tried this vs the Now, it's clear that this behaviour is a bug in that hook (as from its name it should obviously only be fixing line endings!), but the fact that this was literally the first tool I tried this with suggests to me that this is still a fragile solution, and that anything involving embedding actual CR characters in a So, while this PR is a clear improvement on the current situation, may I suggest that it might be worth considering a less precise but more robust solution not involving actual CR characters? For example, in the same Stack Overflow thread mentioned by @i-to-r in their comment above, we also have this answer, which suggests an approach like this:
As the author says in that answer, it would be worth expanding the I'd actually started working on a PR suggesting this when I realised I should check if something similar was already in flight, which led me to this PR. |
What about I don't have MacOS for testing, but was able to ignore in WSL2 Ubuntu, and Android Termux, both of which allow creation of One odd thing, files created in WSL2/Ubuntu with |
This PR is stale because there have been no updates in 90 days. It will close after 180 days of inactivity. Leave a comment if you want to keep it open 😄 |
Toptal's "solution" was to do nothing, as there's no easy way, or something, Just pinging with a comment, and also to raise awareness that just because a referenced issue was closed, doesn't mean there was any change or solution. |
Nyahlanggan
Pada Jum, 30 Mei 2025, 12:35 PG github-actions[bot] <
***@***.***> menulis:
… *github-actions[bot]* left a comment (github/gitignore#3523)
<#3523 (comment)>
This PR is stale because there have been no updates in 90 days. It will
close after 180 days of inactivity. Leave a comment if you want to keep it
open 😄
—
Reply to this email directly, view it on GitHub
<#3523 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BMI7AEM7YPL2NNQM3L5BF5T3A4ZOVAVCNFSM6AAAAAB6F5ZNXSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDSMJZHE2DANRQHA>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Fixed #2203 PR.
Reasons for making this change:
Make
Icon\r
pattern less vulnerable to editors and to autoCRLF
→LF
conversion on commit. As @spencermathews wrote in #2337 :Note: the Start..End comment has been added because most editors display
Icon[␍]
pattern in two lines:Links to documentation supporting these rule changes:
Icon[\r]
)