1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2024-12-12 11:15:00 +02:00

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.
This commit is contained in:
Stefan Haller 2023-07-01 15:48:43 +02:00
parent 956399a1ea
commit f4ada537d2
2 changed files with 3 additions and 3 deletions

View File

@ -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))

View File

@ -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
}