1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-28 16:02:01 +03: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

@ -583,7 +583,7 @@ func (self *CommitLoader) getFirstPushedCommit(refName string) (string, error) {
// getLog gets the git log.
func (self *CommitLoader) getLogCmd(opts GetCommitsOptions) *oscommands.CmdObj {
gitLogOrder := self.AppState.GitLogOrder
gitLogOrder := self.UserConfig().Git.Log.Order
refSpec := opts.RefName
if opts.RefToShowDivergenceFrom != "" {

View File

@ -9,7 +9,6 @@ import (
"github.com/jesseduffield/lazygit/pkg/commands/models"
"github.com/jesseduffield/lazygit/pkg/commands/oscommands"
"github.com/jesseduffield/lazygit/pkg/common"
"github.com/jesseduffield/lazygit/pkg/config"
"github.com/jesseduffield/lazygit/pkg/utils"
"github.com/samber/lo"
"github.com/stefanhaller/git-todo-parser/todo"
@ -298,8 +297,7 @@ func TestGetCommits(t *testing.T) {
for _, scenario := range scenarios {
t.Run(scenario.testName, func(t *testing.T) {
common := common.NewDummyCommon()
common.AppState = &config.AppState{}
common.AppState.GitLogOrder = scenario.logOrder
common.UserConfig().Git.Log.Order = scenario.logOrder
cmd := oscommands.NewDummyCmdObjBuilder(scenario.runner)
builder := &CommitLoader{