summaryrefslogtreecommitdiffstats
path: root/pkg/commands
diff options
context:
space:
mode:
authorstk <stk@ableton.com>2023-02-07 12:09:15 +0100
committerstk <stk@ableton.com>2023-02-07 12:09:15 +0100
commit946c1dff99513956f6a9f23e0104e564807eaa01 (patch)
tree6cd75cef191fbd89a4f5875f299aa386a9d99bb9 /pkg/commands
parentd838965a41975938f3812d4a5dad374ccbcce471 (diff)
Cleanup: remove extra space
Diffstat (limited to 'pkg/commands')
-rw-r--r--pkg/commands/git_commands/commit.go2
-rw-r--r--pkg/commands/git_commands/commit_test.go6
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",
},
}