1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-06-15 00:15:32 +02:00

add deadlock mutex package

write to deadlock stderr after closing gocui

more deadlock checking
This commit is contained in:
Jesse Duffield
2022-08-07 09:44:50 +10:00
parent 7410acd1aa
commit 755ae0ef84
44 changed files with 1635 additions and 57 deletions

View File

@ -5,9 +5,9 @@ import (
"os"
"path/filepath"
"strings"
"sync"
"github.com/go-errors/errors"
"github.com/sasha-s/go-deadlock"
gogit "github.com/jesseduffield/go-git/v5"
"github.com/jesseduffield/lazygit/pkg/commands/git_commands"
@ -57,7 +57,7 @@ func NewGitCommand(
cmn *common.Common,
osCommand *oscommands.OSCommand,
gitConfig git_config.IGitConfig,
syncMutex *sync.Mutex,
syncMutex *deadlock.Mutex,
) (*GitCommand, error) {
if err := navigateToRepoRootDirectory(os.Stat, os.Chdir); err != nil {
return nil, err
@ -89,7 +89,7 @@ func NewGitCommandAux(
gitConfig git_config.IGitConfig,
dotGitDir string,
repo *gogit.Repository,
syncMutex *sync.Mutex,
syncMutex *deadlock.Mutex,
) *GitCommand {
cmd := NewGitCmdObjBuilder(cmn.Log, osCommand.Cmd)