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:
@ -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()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user