Remove go-git repo from ConfigCommands

This commit is contained in:
Stefan Haller 2026-03-27 14:02:47 +01:00
parent 1da87b9a7c
commit 6f9d234116
3 changed files with 2 additions and 6 deletions

View file

@ -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)

View file

@ -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,
}
}

View file

@ -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 {