summaryrefslogtreecommitdiffstats
path: root/pkg/commands/git_commands/common.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/commands/git_commands/common.go')
-rw-r--r--pkg/commands/git_commands/common.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/pkg/commands/git_commands/common.go b/pkg/commands/git_commands/common.go
index a045be75a..85f0d2118 100644
--- a/pkg/commands/git_commands/common.go
+++ b/pkg/commands/git_commands/common.go
@@ -1,6 +1,8 @@
package git_commands
import (
+ "sync"
+
gogit "github.com/jesseduffield/go-git/v5"
"github.com/jesseduffield/lazygit/pkg/commands/oscommands"
"github.com/jesseduffield/lazygit/pkg/common"
@@ -13,6 +15,8 @@ type GitCommon struct {
dotGitDir string
repo *gogit.Repository
config *ConfigCommands
+ // mutex for doing things like push/pull/fetch
+ syncMutex *sync.Mutex
}
func NewGitCommon(
@@ -22,6 +26,7 @@ func NewGitCommon(
dotGitDir string,
repo *gogit.Repository,
config *ConfigCommands,
+ syncMutex *sync.Mutex,
) *GitCommon {
return &GitCommon{
Common: cmn,
@@ -30,5 +35,6 @@ func NewGitCommon(
dotGitDir: dotGitDir,
repo: repo,
config: config,
+ syncMutex: syncMutex,
}
}