1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-11-25 22:32:13 +02:00

Un-deprecate UserConfig.Git.Log.Order and ShowGraph

And remove them from AppState.
This commit is contained in:
Stefan Haller
2025-07-07 17:14:55 +02:00
parent 703256e92d
commit 562a2aaa6b
28 changed files with 46 additions and 59 deletions

View File

@@ -107,17 +107,6 @@ func NewAppConfig(
return nil, err
}
// Temporary: the defaults for these are set to empty strings in
// getDefaultAppState so that we can migrate them from userConfig (which is
// now deprecated). Once we remove the user configs, we can remove this code
// and set the proper defaults in getDefaultAppState.
if appState.GitLogOrder == "" {
appState.GitLogOrder = userConfig.Git.Log.Order
}
if appState.GitLogShowGraph == "" {
appState.GitLogShowGraph = userConfig.Git.Log.ShowGraph
}
appConfig := &AppConfig{
name: name,
version: version,
@@ -677,15 +666,6 @@ type AppState struct {
ShellCommandsHistory []string `yaml:"customcommandshistory"`
HideCommandLog bool
// One of: 'date-order' | 'author-date-order' | 'topo-order' | 'default'
// 'topo-order' makes it easier to read the git log graph, but commits may not
// appear chronologically. See https://git-scm.com/docs/
GitLogOrder string
// This determines whether the git graph is rendered in the commits panel
// One of 'always' | 'never' | 'when-maximised'
GitLogShowGraph string
}
func getDefaultAppState() *AppState {
@@ -694,8 +674,6 @@ func getDefaultAppState() *AppState {
RecentRepos: []string{},
StartupPopupVersion: 0,
LastVersion: "",
GitLogOrder: "", // should be "topo-order" eventually
GitLogShowGraph: "", // should be "always" eventually
}
}