summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Haller <stefan@haller-berlin.de>2023-07-01 15:48:43 +0200
committerStefan Haller <stefan@haller-berlin.de>2023-07-10 15:09:17 +0200
commitf4ada537d2f92c52264afe89769acbcb9a9f643f (patch)
tree7b75aec93eb0fb622b93e63c1cd8b8512fc72f7f
parent956399a1ea3806e70f33a6b36a6e670c94999e2e (diff)
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.
-rw-r--r--pkg/integration/components/runner.go2
-rw-r--r--pkg/integration/components/shell.go4
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
}