1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-10-20 19:12:29 +03:00

more efficient context diff size changing

This commit is contained in:
Jesse Duffield
2021-11-21 12:48:49 +11:00
parent de0e885c65
commit 1996eddd91
25 changed files with 255 additions and 159 deletions

View File

@@ -444,13 +444,13 @@ func TestGitCommandDiff(t *testing.T) {
// TestGitCommandShowFileDiff is a function.
func TestGitCommandShowFileDiff(t *testing.T) {
type scenario struct {
testName string
command func(string, ...string) *exec.Cmd
from string
to string
reverse bool
plain bool
contextSize int
testName string
command func(string, ...string) *exec.Cmd
from string
to string
reverse bool
plain bool
contextSize int
}
scenarios := []scenario{
@@ -489,7 +489,7 @@ func TestGitCommandShowFileDiff(t *testing.T) {
gitCmd := NewDummyGitCommand()
gitCmd.OSCommand.Command = s.command
gitCmd.Config.GetUserConfig().Git.DiffContextSize = s.contextSize
gitCmd.ShowFileDiff(s.from, s.to, s.reverse, "test.txt", s.plain)
_, _ = gitCmd.ShowFileDiff(s.from, s.to, s.reverse, "test.txt", s.plain)
})
}
}