1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-01-26 05:37:18 +02:00

Put gitCommon.version back in deps_test.go

This was reverted in 3546ab8f21, but shouldn't have.
This commit is contained in:
Stefan Haller 2023-04-24 12:43:45 +02:00
parent d210107caa
commit a41218551d

View File

@ -15,6 +15,7 @@ import (
type commonDeps struct { type commonDeps struct {
runner *oscommands.FakeCmdObjRunner runner *oscommands.FakeCmdObjRunner
userConfig *config.UserConfig userConfig *config.UserConfig
gitVersion *GitVersion
gitConfig *git_config.FakeGitConfig gitConfig *git_config.FakeGitConfig
getenv func(string) string getenv func(string) string
removeFile func(string) error removeFile func(string) error
@ -48,6 +49,11 @@ func buildGitCommon(deps commonDeps) *GitCommon {
gitCommon.Common.UserConfig = config.GetDefaultConfig() gitCommon.Common.UserConfig = config.GetDefaultConfig()
} }
gitCommon.version = deps.gitVersion
if gitCommon.version == nil {
gitCommon.version = &GitVersion{2, 0, 0, ""}
}
gitConfig := deps.gitConfig gitConfig := deps.gitConfig
if gitConfig == nil { if gitConfig == nil {
gitConfig = git_config.NewFakeGitConfig(nil) gitConfig = git_config.NewFakeGitConfig(nil)