facebook / sapling

A Scalable, User-Friendly Source Control System.
https://sapling-scm.com
GNU General Public License v2.0
6.18k stars 285 forks source link

Cannot ignore macOS Icon\r file #924

Open richjames0 opened 4 months ago

richjames0 commented 4 months ago

On macOS it seems the Finder icon for a directory can be overridden by adding a "secret" Icon\r (which sometimes appears as Icon?. Ableton does this, for example.

I can find no way of having Sapling ignore this when in git mode - there are other folks with solutions for git on the internet (using .gitignore of course) but none of them works for Sapling and this then creates problems for every sl command executed with the only solution seeming to be to delete the icon file (which isn't a huge deal but it's an annoying addition to the workflow which is easy to forget if trying to use sl to control Ableton files).

evangrayk commented 2 months ago

Hmm, I can't seem to repro this. In either a sapling clone of a git repo or a transparent git repo, these Icon\r files are already not included in sl status for me. This is without any sort of .gitignore.

Perhaps this is because I have watchman installed and watchman ignores these files already? I did see one line of output: skipping invalid path 'myfolder/Icon\r'.

(my attempted steps: have a repo with a file inside a directory, copy some image file, do "get info" on the folder in finder, click the folder icon in the top of get info so it's selected, paste the image. The folder icon is replaced and the Icon\r file is created)

richjames0 commented 2 months ago

Thanks for looking into it! It's been a while so I can't remember the exact details but I definitely got that warning for every action I did (which gets annoying!) and then I feel like it created other problems but I can't remember them now. If I try again I'll give more details but it'd be great to be able to avoid those warnings