summaryrefslogtreecommitdiffstats
path: root/pkg/commands
diff options
context:
space:
mode:
authorStefan Haller <stefan@haller-berlin.de>2023-04-24 12:43:45 +0200
committerStefan Haller <stefan@haller-berlin.de>2023-04-29 07:28:33 +0200
commita41218551da19b4fb987c5090665692d24852d03 (patch)
treec8c8a1fba52cf6aa003fb4c5504c25373bd03042 /pkg/commands
parentd210107caaf221c17f19d56fc0ec76bf157eb044 (diff)
Put gitCommon.version back in deps_test.go
This was reverted in 3546ab8f21, but shouldn't have.
Diffstat (limited to 'pkg/commands')
-rw-r--r--pkg/commands/git_commands/deps_test.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/pkg/commands/git_commands/deps_test.go b/pkg/commands/git_commands/deps_test.go
index df2c96253..bcf36b168 100644
--- a/pkg/commands/git_commands/deps_test.go
+++ b/pkg/commands/git_commands/deps_test.go
@@ -15,6 +15,7 @@ import (
type commonDeps struct {
runner *oscommands.FakeCmdObjRunner
userConfig *config.UserConfig
+ gitVersion *GitVersion
gitConfig *git_config.FakeGitConfig
getenv func(string) string
removeFile func(string) error
@@ -48,6 +49,11 @@ func buildGitCommon(deps commonDeps) *GitCommon {
gitCommon.Common.UserConfig = config.GetDefaultConfig()
}
+ gitCommon.version = deps.gitVersion
+ if gitCommon.version == nil {
+ gitCommon.version = &GitVersion{2, 0, 0, ""}
+ }
+
gitConfig := deps.gitConfig
if gitConfig == nil {
gitConfig = git_config.NewFakeGitConfig(nil)