mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-08-24 10:13:41 -05:00
Having the cache in state.yml causes this file to be rewritten every 60s, which is annoying if you have a lazygit running in the background somewhere without even realizing it, and it keeps overwriting the foreground lazygit's newer command shell history and recent repos list with its stale data. State.yml should only contain things that change in response to user actions, not periodically.
22 lines
578 B
Go
22 lines
578 B
Go
package config
|
|
|
|
import (
|
|
"gopkg.in/yaml.v3"
|
|
)
|
|
|
|
// NewDummyAppConfig creates a new dummy AppConfig for testing
|
|
func NewDummyAppConfig() *AppConfig {
|
|
userConfig := GetDefaultConfig()
|
|
userConfig.Keybinding.MergeLegacyAltKeybindings()
|
|
appConfig := &AppConfig{
|
|
name: "lazygit",
|
|
version: "unversioned",
|
|
debug: false,
|
|
userConfig: userConfig,
|
|
appState: &AppState{},
|
|
githubPullRequestCache: newGithubPullRequestCache(""),
|
|
}
|
|
_ = yaml.Unmarshal([]byte{}, appConfig.appState)
|
|
return appConfig
|
|
}
|