milke / GitFinder-Issues

Bug and issue tracker for GitFinder - git client with macOS Finder integration
16 stars 1 forks source link

Doesn't work with Documents folder #88

Open ajc opened 3 years ago

ajc commented 3 years ago

I'm on Version 1.7.1 (104).

One of the folders I manage via git is my Documents folder.

Whilst other folders work fine, and I see the green tick icons and so on in Finder, my Documents folder shows me nothing.

I've removed it & re-added it, even restarting GitFinder in-between, but to no avail.

What else can I try?

milke commented 3 years ago

Please read answer to question "GitFinder is running, but I don't see icon badges nor git menu commands?" in the FAQ section of the support page. I think the special interest for you is part about collision between more Finder Sync extensions. Try the simple procedure outlined there and let me know it that helped.

ajc commented 3 years ago

Great. That seemed to work. Cheers!

milke commented 3 years ago

Yeah, Apple didn't do a very good job when it comes to extension collision regarding icon badges. The solution outlined in the support page seems logical though, but it's nowhere documented, hence I had some tough time figuring it out.

I'll leave this open for a day or two, perhaps someone else with the same problem will find it more easily.

ajc commented 3 years ago

I did experiment with trying to turn the extensions back on one-by-one and restarting GitFinder each time and found it stopped working again (just for Documents).

Eventually I noticed the secret extra metadata folder GitFinder made under Documents/.git - it was empty, unlike the ones it made in other (working) folders. I went back to just GitFinder's extension enabled, removed that empty folder in Documents/.git and restarted GitFinder and all was well. Re-enabling the other Finder extensions (but not restarting GitFinder or fiddling othewise) seems ok.

milke commented 3 years ago

May I ask, why do you have ~Documents/.git folder? I don't think your whole documents folder is one huge git repository?

ajc commented 3 years ago

Yes, I keep much of my Documents folder (not quite all) in git. It's mostly text files (Emacs org-mode, etc.).

This is my work computer, and so other things like MS Office documents and such are all kept in cloud storage (eg. OneDrive) and don't live under my Documents folder. I realise it's a bit of an odd use-case :)

milke commented 3 years ago

OK, good that it works now… Let me know if you run into similar problems again.

eerkov commented 3 years ago

I have a folder in the Documents folder that does not work with GitFinder. The hints on the support page do not help either, no other extensions are active. Other folders, located elsewhere on the drive, do work without issue. I have iCloud Drive enabled, if that makes a difference.

milke commented 3 years ago

A couple of questions

1. By "I have iCloud Drive enabled" you actually mean that you enabled iCould option to share Desktop and Document folders?

Screen Shot 2021-08-03 at 09 39 27

2. Which macOS version do you use?

3. Have you added your ~/Documents folder or that particular "folder in the Documents folder" in GitFinder repositories settings?

Screen Shot 2021-08-03 at 09 41 42
eerkov commented 3 years ago
  1. Correct.
  2. 11.5
  3. I've added a specific folder in the Documents folder, path /Users/User/Documents/subfolder/projectFolder

I've checked the Documents folder itself doesn't have an empty .git folder or anything The projectFolder is a working git folder in SourceTree.

milke commented 3 years ago

@eerkov, I think I have even better question now :-) Do you use only the list view? What happens if you switch to the icons or columns view?

eerkov commented 3 years ago

I noticed it's only the icons that aren't showing, the contextual menu does display GitFinder commands for the files in that folder. Indeed, in columns view I do have the icons, in list and icon view I do not see them.

milke commented 3 years ago

@eerkov yeah, another user reported the same, but he uses Monterey beta and at the beginning I didn't figure out he also have D & D folders shared on iCloud, so I thought it may be a Monterey related issue…

It definitely seems like a bug in Finder, as I can’t control how it displays and renders icon badges. But I’ll try to find some other publicly available extension to confirm it does (not) do the same. I’ll let you know the results.

milke commented 3 years ago

@eerkov Okay, I've just tried another Finder Sync extension and it behaves exactly the same; if a monitored folder is inside Documents - iCloud or Desktop - iCloud hierarchy, contextual menu items are present in all view types, but icon badges are present in the columns view only.

I'm afraid I can't do anything about this, but to file a bug report at Apple. I encourage you to do the same, as the more similar/same reports, the bigger the probability they will fix it. I'll let you know the bug/issue number once I file it.

eerkov commented 3 years ago

Thanks for looking into it!

milke commented 3 years ago

Thanks for looking into it!

No problem, let's hope it'll be fixed quickly.

milke commented 3 years ago

@eerkov, I filed a bug report (feedback, as Apple like to call that these days), its number is FB9449243. I'd suggest you do the same, that may make the bug fixed quicker (hopefully). If you're a member of an Apple Developer Program, you can do it using Feedback Assistant right away. If you aren't, you can join Apple Beta Software Program (for free) and then use the Feedback Assistant to report this bug.

iocouto commented 3 years ago

Just thought I'd leave a comment, to put this issue into context, and just in case some people may not be aware: using a version control system (like git, subversion, mercurial, fossil, etc.) together with a cloud backup and storage solution (like iCloud, DropBox, Google Drive, etc.) is a very bad idea. So, if you're managing a project folder with git - or GitFinder - then that folder should not be in a location in your Mac that is managed by iCloud - like your 'Documents' or 'Desktop'.

In case you're interested, here's why.

Cloud storage and backup solutions - like iCloud, Dropbox, etc. - usually work by slowly synchronising the files that have been changed in your hard drive, with the cloud server. This synchronisation usually happens in the background, bit by bit, when the computer has time - it's almost never immediate. This works perfectly fine for backing up your personal documents, or synchronising your work between your laptop and your desktop computers. Whenever you make a change in one of your documents, the cloud service adds that change to the 'queue' of syncs that need to happen, at some point in the future.

Version control systems like git, however, often make vast, sweeping changes to thousands of files at once. Think, for example, when you switch branches in a project, or rebase changes from the remote. As soon as you change branches, iCloud will 'tag' (perhaps) hundreds of files as 'changed', and put them on the sync queue. If 10 minutes later you decide to undo your changes, and revert to the old branch, iCloud thinks you've made yet another change, and will create hundreds of sync tasks, again. But even worse, is that when iCloud starts to get through the queue, you might start to see 'duplicate' files appearing all over your repository - the files iCloud might have already started to sync from the previous branch change. You can potentially end up with hundreds of unwanted, duplicate files, which dirty up your repository and are hard to clean...

Note that this is not a git+iCloud problem, but rather something you'll experience in one form or another when you try to use any VCS and a cloud storage service, at the same time. But the good news is that you should never need to use both. A solution like iCloud is great for simple backup and synchronisation of personal files among your computers. But if you have a project that is already under version control in git, then use a git-based repository hosting service - like GitHub, Gitlab, Bitbucket, or many others - which are available even for free. This will ensure your repository will be safely backed up in the cloud, and you will have all the 'extra' version control features that you don't get with iCloud/Dropbox/Google Drive.

eerkov commented 3 years ago

@milke Reported, FB9451279 @iocouto Thanks for the heads-up. In this case it's a low-volume, single-branch project but it's good to know!

Touchstone64 commented 3 years ago

@milke also reported, FB9474663 @iocouto very good point 👍 Accepting and managing those limitations, though, there are some situations I have with clients in disparate secure environments where storing repos in iCloud actually solves workflow problems. Horses for courses 👍