mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-30 03:23:08 +03:00
WIP
This commit is contained in:
@ -79,6 +79,14 @@ func (gui *Gui) dispatchSwitchToRepo(path string) error {
|
||||
gui.GitCommand = newGitCommand
|
||||
|
||||
gui.g.Update(func(*gocui.Gui) error {
|
||||
// these two mutexes are used by our background goroutines (triggered via `gui.goEvery`. We don't want to
|
||||
// switch to a repo while one of these goroutines is in the process of updating something
|
||||
gui.Mutexes.FetchMutex.Lock()
|
||||
defer gui.Mutexes.FetchMutex.Unlock()
|
||||
|
||||
gui.Mutexes.RefreshingFilesMutex.Lock()
|
||||
defer gui.Mutexes.RefreshingFilesMutex.Unlock()
|
||||
|
||||
gui.resetState("")
|
||||
|
||||
return nil
|
||||
|
Reference in New Issue
Block a user