1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-11-23 22:24:51 +02:00

avoid deadlock

This commit is contained in:
Jesse Duffield
2022-01-29 11:22:35 +11:00
parent cb0d3a480a
commit 1a74ed3214
3 changed files with 6 additions and 15 deletions

View File

@@ -397,7 +397,7 @@ type Modes struct {
type guiMutexes struct {
RefreshingFilesMutex *sync.Mutex
RefreshingStatusMutex *sync.Mutex
FetchMutex *sync.Mutex
SyncMutex *sync.Mutex
BranchCommitsMutex *sync.Mutex
LineByLinePanelMutex *sync.Mutex
SubprocessMutex *sync.Mutex
@@ -514,7 +514,7 @@ func NewGui(
Mutexes: guiMutexes{
RefreshingFilesMutex: &sync.Mutex{},
RefreshingStatusMutex: &sync.Mutex{},
FetchMutex: &sync.Mutex{},
SyncMutex: &sync.Mutex{},
BranchCommitsMutex: &sync.Mutex{},
LineByLinePanelMutex: &sync.Mutex{},
SubprocessMutex: &sync.Mutex{},
@@ -537,7 +537,7 @@ func NewGui(
cmn,
osCommand,
gitConfig,
gui.Mutexes.FetchMutex,
gui.Mutexes.SyncMutex,
)
if err != nil {
return nil, err
@@ -666,7 +666,6 @@ func (gui *Gui) setControllers() {
getContexts,
gui.getSelectedRemote,
func(branches []*models.RemoteBranch) { gui.State.RemoteBranches = branches },
gui.Mutexes.FetchMutex,
),
Menu: controllers.NewMenuController(
controllerCommon,