summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Haller <stefan@haller-berlin.de>2023-07-01 15:50:50 +0200
committerStefan Haller <stefan@haller-berlin.de>2023-07-10 15:09:17 +0200
commit82b3803164395e34e0f57c0ce2930350adc578d1 (patch)
tree9b1d27b191d3fb56fd0a43555942912fa1e483b9
parentf4ada537d2f92c52264afe89769acbcb9a9f643f (diff)
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.
-rw-r--r--pkg/integration/components/shell.go2
1 files changed, 1 insertions, 1 deletions
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
}