NibbleByte / UnityWiseGit

Simple but powerful git integration for Unity 3D
MIT License
39 stars 3 forks source link

No file ever locked #1

Open WildRikku opened 23 hours ago

WildRikku commented 23 hours ago

Hello,

I am trying to use this asset mainly for the locks but no locks are ever requested. I traced it down until I figured that at this point https://github.com/NibbleByte/UnityWiseGit/blob/master/Assets/DevLocker/VersionControl/WiseGit/Editor/LockPrompting/GitLockPromptDatabase.cs#L337, statusDatabaseData contains 0 entries. I can perform other git operations with the plugin so I think nothing is globally broken or setup wrongly. Lock requests are enabled in the settings. I'd appreciate some help.

NibbleByte commented 15 hours ago

The locks prompt uses the statuses retrieved by the GitStatusesDatabase. If it doesn't retrieve anything, it won't know what to lock. In order for this to happen, you need to enable overlay icons in the WiseGit preference window. Also make sure remote changes are fetched, and the refresh interval is a sensible number (in seconds). image

If fetching remote changes is set to "Same As Project Preference", then check in the "Project" tab. image

Note: when fetching remote changes is enabled, this means WiseGit will regularly call "git fetch" in the background, downloading any remote changes to your local ".git" folder (this won't affect your working copy). If there are a lot of remote changes (added assets) it may take some time to download. Check if everything was fetched correctly.

Hint: use the context menu Git / Refresh Icons & Locks to manually refresh the icons. At the bottom right corner of the Unity window, you'll see the progress bar "Git Refresh" indicating that is working. Check if it manages to finish or it remains stuck forever.

As a last resort, can you type in cmd from your root folder the command git status --porcelain and post the output here.