1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-28 16:02:01 +03:00

Cleanup: remove extra space

This commit is contained in:
stk
2023-02-07 12:09:15 +01:00
parent d838965a41
commit 946c1dff99
2 changed files with 4 additions and 4 deletions

View File

@ -156,7 +156,7 @@ func (self *CommitCommands) ShowCmdObj(sha string, filterPath string) oscommands
filterPathArg = fmt.Sprintf(" -- %s", self.cmd.Quote(filterPath)) 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() return self.cmd.New(cmdStr).DontLog()
} }

View File

@ -188,19 +188,19 @@ func TestCommitShowCmdObj(t *testing.T) {
testName: "Default case without filter path", testName: "Default case without filter path",
filterPath: "", filterPath: "",
contextSize: 3, 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", testName: "Default case with filter path",
filterPath: "file.txt", filterPath: "file.txt",
contextSize: 3, 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", testName: "Show diff with custom context size",
filterPath: "", filterPath: "",
contextSize: 77, 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",
}, },
} }