Files
lazygit/pkg/config/dummies.go
Stefan Haller 47471c501b Move Github PR cache out of state.yml into a separate file
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.
2026-08-02 19:09:22 +02:00

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
}