From 82b3803164395e34e0f57c0ce2930350adc578d1 Mon Sep 17 00:00:00 2001 From: Stefan Haller Date: Sat, 1 Jul 2023 15:50:50 +0200 Subject: Use -c init.defaultBranch=master to pass the desired main branch to git init Older versions of git don't support the -b option yet. However, no version of git complains about the -c option, even when the init.defaultBranch config is not supported. --- pkg/integration/components/shell.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/integration/components/shell.go b/pkg/integration/components/shell.go index 847e7bd70..cb21c0c01 100644 --- a/pkg/integration/components/shell.go +++ b/pkg/integration/components/shell.go @@ -255,7 +255,7 @@ func (self *Shell) StartBisect(good string, bad string) *Shell { } func (self *Shell) Init() *Shell { - self.RunCommand([]string{"git", "init", "-b", "master"}) + self.RunCommand([]string{"git", "-c", "init.defaultBranch=master", "init"}) return self } -- cgit v1.2.3