1
0
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:
Stefan Haller 2024-03-30 15:07:52 +01:00
parent 48bb3a9dce
commit cd0f72d66a
2 changed files with 0 additions and 14 deletions

View File

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

View File

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