1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-19 21:03:15 +03:00

Move IgnoreWhitespaceInDiffView to user config

When toggling the value in the UI we simply overwrite the value in UserConfig;
this would be bad if there was ever a chance that we want to write the user
config back to disk, but it is very unlikely that we can do that, because
currently we have no way to tell which parts of the config come from the global
config file and which ones come from a repo-local one.
This commit is contained in:
Stefan Haller
2025-07-07 14:57:12 +02:00
parent f3164afa1e
commit 8d7bfd131e
13 changed files with 27 additions and 18 deletions

View File

@ -320,8 +320,8 @@ func TestCommitShowCmdObj(t *testing.T) {
t.Run(s.testName, func(t *testing.T) {
userConfig := config.GetDefaultConfig()
userConfig.Git.Paging.ExternalDiffCommand = s.extDiffCmd
userConfig.Git.IgnoreWhitespaceInDiffView = s.ignoreWhitespace
appState := &config.AppState{}
appState.IgnoreWhitespaceInDiffView = s.ignoreWhitespace
appState.DiffContextSize = s.contextSize
appState.RenameSimilarityThreshold = s.similarityThreshold