From 946c1dff99513956f6a9f23e0104e564807eaa01 Mon Sep 17 00:00:00 2001 From: stk Date: Tue, 7 Feb 2023 12:09:15 +0100 Subject: [PATCH] Cleanup: remove extra space --- pkg/commands/git_commands/commit.go | 2 +- pkg/commands/git_commands/commit_test.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/commands/git_commands/commit.go b/pkg/commands/git_commands/commit.go index b5293a2ff..2cba7c265 100644 --- a/pkg/commands/git_commands/commit.go +++ b/pkg/commands/git_commands/commit.go @@ -156,7 +156,7 @@ func (self *CommitCommands) ShowCmdObj(sha string, filterPath string) oscommands filterPathArg = fmt.Sprintf(" -- %s", self.cmd.Quote(filterPath)) } - cmdStr := fmt.Sprintf("git show --submodule --color=%s --unified=%d --no-renames --stat -p %s %s", self.UserConfig.Git.Paging.ColorArg, contextSize, sha, filterPathArg) + cmdStr := fmt.Sprintf("git show --submodule --color=%s --unified=%d --no-renames --stat -p %s%s", self.UserConfig.Git.Paging.ColorArg, contextSize, sha, filterPathArg) return self.cmd.New(cmdStr).DontLog() } diff --git a/pkg/commands/git_commands/commit_test.go b/pkg/commands/git_commands/commit_test.go index 1d6bc7f8f..ac129098d 100644 --- a/pkg/commands/git_commands/commit_test.go +++ b/pkg/commands/git_commands/commit_test.go @@ -188,19 +188,19 @@ func TestCommitShowCmdObj(t *testing.T) { testName: "Default case without filter path", filterPath: "", contextSize: 3, - expected: "git show --submodule --color=always --unified=3 --no-renames --stat -p 1234567890 ", + expected: "git show --submodule --color=always --unified=3 --no-renames --stat -p 1234567890", }, { testName: "Default case with filter path", filterPath: "file.txt", contextSize: 3, - expected: `git show --submodule --color=always --unified=3 --no-renames --stat -p 1234567890 -- "file.txt"`, + expected: `git show --submodule --color=always --unified=3 --no-renames --stat -p 1234567890 -- "file.txt"`, }, { testName: "Show diff with custom context size", filterPath: "", contextSize: 77, - expected: "git show --submodule --color=always --unified=77 --no-renames --stat -p 1234567890 ", + expected: "git show --submodule --color=always --unified=77 --no-renames --stat -p 1234567890", }, }