cmarcusreid / git-status-cache

High performance cache for git repository status. Clients can retrieve information via named pipe.
MIT License
16 stars 4 forks source link

Release lock on directory #22

Open erichiller opened 6 years ago

erichiller commented 6 years ago

Whenever I want to delete a directory which contains a repo, I have to kill the GitStatusCache.exe process before deleting, otherwise deletion is not possible.

I am not sure if this is a bug or a necessary side effect of monitoring a repo, but I wanted to report it and see if it could be changed if possible.

(I'm not sure what version I'm running, I THINK it is the most recent version, but I could not find any flags that would echo back the version I am running, is there a method to do this?)

Thanks -Eric

cmarcusreid commented 6 years ago

I haven't confirmed, but it sounds like the directory is either be locked in libgit2 or in the file system monitor that git-status-cache uses to invalidate on file system changes. The latter is opening with the FILE_SHARE_DELETE flag (which I believe shouldn't block the delete), so I'm guessing it's the former. (https://github.com/cmarcusreid/git-status-cache/blob/master/ext/ReadDirectoryChanges/src/ReadDirectoryChangesPrivate.cpp)

You can always pull the latest version with Update-GitStatusCache, but there's never been a change around directory locking behavior.

erichiller commented 6 years ago

Ah, so if anything it might be best to open a ticket with libgit2? Just to be sure, you see this behavior as well correct?

cmarcusreid commented 6 years ago

I am traveling and have not had an opportunity to test on my end.