diff --git a/pkg/commands/git_commands/commit_test.go b/pkg/commands/git_commands/commit_test.go index 713c9fffa..74341bba8 100644 --- a/pkg/commands/git_commands/commit_test.go +++ b/pkg/commands/git_commands/commit_test.go @@ -196,8 +196,8 @@ func TestCommitShowCmdObj(t *testing.T) { testName: "Default case with filter path", filterPath: "file.txt", contextSize: 3, - ignoreWhitespace: true, - expected: `git show --submodule --color=always --unified=3 --no-renames --stat -p 1234567890 --ignore-all-space -- "file.txt"`, + ignoreWhitespace: false, + expected: `git show --submodule --color=always --unified=3 --no-renames --stat -p 1234567890 -- "file.txt"`, }, { testName: "Show diff with custom context size", @@ -206,6 +206,13 @@ func TestCommitShowCmdObj(t *testing.T) { ignoreWhitespace: false, expected: "git show --submodule --color=always --unified=77 --no-renames --stat -p 1234567890", }, + { + testName: "Show diff, ignoring whitespace", + filterPath: "", + contextSize: 77, + ignoreWhitespace: true, + expected: "git show --submodule --color=always --unified=77 --no-renames --stat -p 1234567890 --ignore-all-space", + }, } for _, s := range scenarios {