I am using Mojave with latest Unity and git. I find that change focus to Unity from other app like Terminal may cause that git refreshing its index at the next run of git status.
Although it is Unity related, what I want to know is just what may make git refreshing its index.
My Assets in Unity is under git.
To explain it in steps
1) Switch focus from Terminal to Unity, and Unity will hang for 30 secs
2) Switch back to Terminal and type git status, it shows Refresh Index (xxx/xxx). This will take 30 secs too
3) .git/index file does changed.
These steps loops while nothing changed to any files. And I don't think I have any extension makes any change or lag. Or even I remove all my scripts and extensions but only textures, this still happens.
Well I know Unity should check for all files whenever focus changed. But none of my file's modification file changed.
find . -mmin -2
This shows nothing. (find and list any file that modification time stamp is changed within the last 2 min)
and of course no addition/deletion ever happens to Assets (version control folder)
So what forces git refreshing its index?