Closed Terrance closed 1 year ago
I'm assuming files within
.git
are being left open for faster status information on the next access?
Spot on. The repos are kept open for one hour. You can restart zsh (exec zsh
will do) to avoid waiting.
Can confirm exec
is sufficient to clear the lingering file locks, thanks for the tip!
I haven't been able to consistently reproduce this, but have noticed on several occasions that after working with temporary checkouts of repositories in a gitstatus-enabled shell,
cd
ing out of them and trying to delete them results in Permission denied errors.This is with a shell inside WSL version 1 (with the repository on a Windows drive) and seems to be down to Windows' file locking (attempting to delete from File Explorer tells me the directory is in use by another application but doesn't know which). Exiting the shell allows me to then delete that repository with either method, and the only remaining process besides the shell itself is gitstatus, so I'm assuming files within
.git
are being left open for faster status information on the next access?