diff options
author | Emiliano Ruiz Carletti <contact@eruizc.dev> | 2021-04-16 20:43:10 -0300 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2021-06-15 08:31:07 +1000 |
commit | 46e500dc28e6ca030214f729f3e6954557019cf9 (patch) | |
tree | 9f8bf95e806bc186f72506dd0f54c4c9d9b1b575 /pkg/config | |
parent | d7865b38827809c011f7d81025b80162506e70de (diff) |
Revert "Read pull mode from git configuration"
This reverts commit e69e240a312bf990c9cf93a30648ceec5d3ee629.
Diffstat (limited to 'pkg/config')
-rw-r--r-- | pkg/config/user_config.go | 20 |
1 files changed, 1 insertions, 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" -} |