From 46e500dc28e6ca030214f729f3e6954557019cf9 Mon Sep 17 00:00:00 2001 From: Emiliano Ruiz Carletti Date: Fri, 16 Apr 2021 20:43:10 -0300 Subject: [PATCH] Revert "Read pull mode from git configuration" This reverts commit e69e240a312bf990c9cf93a30648ceec5d3ee629. --- pkg/config/user_config.go | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/pkg/config/user_config.go b/pkg/config/user_config.go index e4a10e10b..1312e4bd8 100644 --- a/pkg/config/user_config.go +++ b/pkg/config/user_config.go @@ -1,9 +1,5 @@ package config -import ( - "github.com/jesseduffield/lazygit/pkg/secureexec" -) - type UserConfig struct { Gui GuiConfig `yaml:"gui"` Git GitConfig `yaml:"git"` @@ -327,7 +323,7 @@ func GetDefaultConfig() *UserConfig { Args: "", }, Pull: PullConfig{ - Mode: getPullModeFromGitConfig(), + Mode: "merge", }, SkipHookPrefix: "WIP", AutoFetch: true, @@ -489,17 +485,3 @@ func GetDefaultConfig() *UserConfig { NotARepository: "prompt", } } - -func getPullModeFromGitConfig() string { - rebaseOut, rebaseErr := secureexec.Command("git config --get pull.rebase").Output() - if rebaseErr == nil && rebaseOut[0] == 't' { - return "rebase" - } - - ffOut, ffErr := secureexec.Command("git config --get pull.ff").Output() - if ffErr == nil && ffOut[0] == 't' { - return "ff-only" - } - - return "merge" -}