Don't pass ignoreWhitespace to git commands

Now that AppState is available via common.Common, they can take it from there.
This commit is contained in:
Stefan Haller 2023-08-28 12:39:52 +02:00
parent 18c5780485
commit 1dac4158e9
16 changed files with 40 additions and 45 deletions

View file

@ -239,11 +239,13 @@ func TestCommitShowCmdObj(t *testing.T) {
userConfig := config.GetDefaultConfig()
userConfig.Git.DiffContextSize = s.contextSize
userConfig.Git.Paging.ExternalDiffCommand = s.extDiffCmd
appState := &config.AppState{}
appState.IgnoreWhitespaceInDiffView = s.ignoreWhitespace
runner := oscommands.NewFakeRunner(t).ExpectGitArgs(s.expected, "", nil)
instance := buildCommitCommands(commonDeps{userConfig: userConfig, runner: runner})
instance := buildCommitCommands(commonDeps{userConfig: userConfig, appState: appState, runner: runner})
assert.NoError(t, instance.ShowCmdObj("1234567890", s.filterPath, s.ignoreWhitespace).Run())
assert.NoError(t, instance.ShowCmdObj("1234567890", s.filterPath).Run())
runner.CheckForMissingCalls()
})
}