From f4ada537d2f92c52264afe89769acbcb9a9f643f Mon Sep 17 00:00:00 2001 From: Stefan Haller Date: Sat, 1 Jul 2023 15:48:43 +0200 Subject: [PATCH] Remove mainBranch parameter from Shell.Init() For older git versions we won't be able to support any other main branch than "master", so hard-code that in Init. This doesn't fix anything for older versions yet; see the next commit for that. --- pkg/integration/components/runner.go | 2 +- pkg/integration/components/shell.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/integration/components/runner.go b/pkg/integration/components/runner.go index 9a787c864..40921fee9 100644 --- a/pkg/integration/components/runner.go +++ b/pkg/integration/components/runner.go @@ -141,7 +141,7 @@ func buildLazygit() error { func createFixture(test *IntegrationTest, paths Paths, rootDir string) error { shell := NewShell(paths.ActualRepo(), func(errorMsg string) { panic(errorMsg) }) - shell.Init("master") + shell.Init() os.Setenv(GIT_CONFIG_GLOBAL_ENV_VAR, globalGitConfigPath(rootDir)) diff --git a/pkg/integration/components/shell.go b/pkg/integration/components/shell.go index 03bd747e2..847e7bd70 100644 --- a/pkg/integration/components/shell.go +++ b/pkg/integration/components/shell.go @@ -254,8 +254,8 @@ func (self *Shell) StartBisect(good string, bad string) *Shell { return self } -func (self *Shell) Init(mainBranch string) *Shell { - self.RunCommand([]string{"git", "init", "-b", mainBranch}) +func (self *Shell) Init() *Shell { + self.RunCommand([]string{"git", "init", "-b", "master"}) return self }