mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-27 23:08:02 +02:00
Remove pointless reloading of UserConfig
It was added in 043cb2ea44, and the commit message was "reload config whenever returning to gui". I don't understand what this means; Run() is called exactly once after startup, so it would just reload the config again for no reason. We will add a real way of reloading the config whenever it has changed later in this branch.
This commit is contained in:
parent
48bb3a9dce
commit
cd0f72d66a
@ -36,7 +36,6 @@ type AppConfigurer interface {
|
||||
GetUserConfig() *UserConfig
|
||||
GetUserConfigPaths() []string
|
||||
GetUserConfigDir() string
|
||||
ReloadUserConfig() error
|
||||
GetTempDir() string
|
||||
|
||||
GetAppState() *AppState
|
||||
@ -252,16 +251,6 @@ func (c *AppConfig) GetUserConfigDir() string {
|
||||
return c.userConfigDir
|
||||
}
|
||||
|
||||
func (c *AppConfig) ReloadUserConfig() error {
|
||||
userConfig, err := loadUserConfigWithDefaults(c.userConfigPaths)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
c.userConfig = userConfig
|
||||
return nil
|
||||
}
|
||||
|
||||
func (c *AppConfig) GetTempDir() string {
|
||||
return c.tempDir
|
||||
}
|
||||
|
@ -658,9 +658,6 @@ func (gui *Gui) Run(startArgs appTypes.StartArgs) error {
|
||||
// breakpoints and stepping through code can easily take more than 30s.
|
||||
deadlock.Opts.Disable = !gui.Debug || os.Getenv(components.WAIT_FOR_DEBUGGER_ENV_VAR) != ""
|
||||
|
||||
if err := gui.Config.ReloadUserConfig(); err != nil {
|
||||
return nil
|
||||
}
|
||||
userConfig := gui.UserConfig
|
||||
|
||||
gui.g.OnSearchEscape = func() error { gui.helpers.Search.Cancel(); return nil }
|
||||
|
Loading…
x
Reference in New Issue
Block a user