mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-09-12 16:46:25 -04:00
Remove go-git repo from ConfigCommands
This commit is contained in:
parent
1da87b9a7c
commit
6f9d234116
|
|
@ -110,7 +110,7 @@ func NewGitCommandAux(
|
|||
// and allows for better namespacing when compared to having every method living
|
||||
// on the one struct.
|
||||
// common ones are: cmn, osCommand, dotGitDir, configCommands
|
||||
configCommands := git_commands.NewConfigCommands(cmn, gitConfig, repo)
|
||||
configCommands := git_commands.NewConfigCommands(cmn, gitConfig)
|
||||
|
||||
gitCommon := git_commands.NewGitCommon(cmn, version, cmd, osCommand, repoPaths, repo, configCommands, pagerConfig)
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ package git_commands
|
|||
import (
|
||||
"strings"
|
||||
|
||||
gogit "github.com/jesseduffield/go-git/v5"
|
||||
"github.com/jesseduffield/lazygit/pkg/commands/git_config"
|
||||
"github.com/jesseduffield/lazygit/pkg/commands/oscommands"
|
||||
"github.com/jesseduffield/lazygit/pkg/common"
|
||||
|
|
@ -19,18 +18,15 @@ type ConfigCommands struct {
|
|||
*common.Common
|
||||
|
||||
gitConfig git_config.IGitConfig
|
||||
repo *gogit.Repository
|
||||
}
|
||||
|
||||
func NewConfigCommands(
|
||||
common *common.Common,
|
||||
gitConfig git_config.IGitConfig,
|
||||
repo *gogit.Repository,
|
||||
) *ConfigCommands {
|
||||
return &ConfigCommands{
|
||||
Common: common,
|
||||
gitConfig: gitConfig,
|
||||
repo: repo,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ func buildGitCommon(deps commonDeps) *GitCommon {
|
|||
}
|
||||
|
||||
gitCommon.repo = buildRepo()
|
||||
gitCommon.config = NewConfigCommands(gitCommon.Common, gitConfig, gitCommon.repo)
|
||||
gitCommon.config = NewConfigCommands(gitCommon.Common, gitConfig)
|
||||
|
||||
getenv := deps.getenv
|
||||
if getenv == nil {
|
||||
|
|
|
|||
Loading…
Reference in a new issue