romkatv / gitstatus

Git status for Bash and Zsh prompt
GNU General Public License v3.0
1.68k stars 106 forks source link

BUG: gitstatus is preventing unmount of external drives with git repositories #408

Closed mamaart closed 8 months ago

mamaart commented 1 year ago

If you have a git repository on a external drive or usb, and you try to unmount it with for instance udisksctl then it will say "target is busy" if you check why with lsof on the drive there are 3 or 4 processes of gitstatus running on it.

killing the process is not the solution, so at the moment I have to force unmount which I don't like.

gitstatus is used by p10k v1.19.0 manually installed for zsh on Nixos.

romkatv commented 1 year ago

See #52

tl;dr: gitstatusd keeps git repositories open for 1h for performance reasons. All git repositories are closed when the shell is closed. In practice this means that you can forcefully close all repositories opened from the current shell with exec zsh.