-
Notifications
You must be signed in to change notification settings - Fork 83.1k
Add .textClipping to exclusions #3550
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
Per https://en.wikipedia.org/wiki/TextClipping this file is created when text is dragged and dropped to a folder. The file created can't be shared between computers.
Did you edit the And if so, did you see the message:
? |
@nmdange2, unfortunately the fix #3523 won't help you directly. GitHub online editor (browser, CodeMirror editor) still corrupts the After the fix #3523 is merged, you should make a commit using, for example, GitHub Desktop and the default TextEdit.app to edit the file (among web browser based editors: latest Atom works fine too, but old Brackets 1.8 don't — but in GitHub Desktop, you can still select which changed lines to include in the commit partial commit ). |
@i-to-r Thanks I'll try redoing the commit in something other than a web browser |
Please do not exclude .textClipping files by default. Reason: Before macOS 10.12, textClippings were only stored in the rsrc fork, which isn't handled by git, and therefore would lead to a complete loss of information.
|
OTOH, it would be much nicer if rsrc forks could also be handled by git, by using the "..namedfork/rsrc" path method. That sub-path allows both reading and writing rsrc forks as regular files. |
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 😄 |
There's some "new" behavior: Recent macOS versions do actually use the data fork with .textClipping files. In fact, in my tests, the same information is stored both in the data and the resource fork. I even made a program (not made public yet) that can recreate the missing side. So, with this knowledge, there's no need to exclude .textClipping files any more, because they do now store content in the git repo, as long as the file have been created by a recent macOS version. There remains one caveat, though: When restoring such a file from the repo onto a macOS system, some macOS features do not work, e.g. Quicklook can't show the textClipping's contents if it's stored only in the data fork while the data in the rsrc fork is missing. I've reported this as a bug to Apple in 2022 (FB9920034), and nothing has changed, of course. Still, someone could write code to restore the rsrc fork when restoring such a file, and then it would work fine. If someone likes to tackle this, I'm happy to provide the code for the conversion from the data to the rsrc fork. |
I ran into the issue referenced in #3523 and I'm not sure how to fix it. I want to add the .textClipping exclusion without breaking the other rule so this pull request should not be accepted until the other one is first.
Reasons for making this change:
Files with the .textClipping extension should be ignored.
Links to documentation supporting these rule changes:
Per https://en.wikipedia.org/wiki/TextClipping this file is created when text is dragged and dropped to a folder. The file created can't be shared between computers.