1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-03-05 15:15:49 +02:00

🎨 prefer the long switch over the short one for easier reading

This commit is contained in:
Davyd McColl 2021-06-14 10:45:29 +02:00 committed by Jesse Duffield
parent 2ac33bb83d
commit ae2496cf80
2 changed files with 2 additions and 2 deletions

View File

@ -211,7 +211,7 @@ func (c *GitCommand) WorktreeFileDiffCmdStr(node models.IFile, plain bool, cache
colorArg = "never" colorArg = "never"
} }
if ignoreWhitespace { if ignoreWhitespace {
ignoreWhitespaceArg = "-w" ignoreWhitespaceArg = "--ignore-all-space"
} }
return fmt.Sprintf("git diff --submodule --no-ext-diff --color=%s %s %s %s %s", colorArg, ignoreWhitespaceArg, cachedArg, trackedArg, path) return fmt.Sprintf("git diff --submodule --no-ext-diff --color=%s %s %s %s %s", colorArg, ignoreWhitespaceArg, cachedArg, trackedArg, path)

View File

@ -414,7 +414,7 @@ func TestGitCommandDiff(t *testing.T) {
"Default case (ignore whitespace)", "Default case (ignore whitespace)",
func(cmd string, args ...string) *exec.Cmd { func(cmd string, args ...string) *exec.Cmd {
assert.EqualValues(t, "git", cmd) assert.EqualValues(t, "git", cmd)
assert.EqualValues(t, []string{"diff", "--submodule", "--no-ext-diff", "--color=always", "-w", "--", "test.txt"}, args) assert.EqualValues(t, []string{"diff", "--submodule", "--no-ext-diff", "--color=always", "--ignore-all-space", "--", "test.txt"}, args)
return secureexec.Command("echo") return secureexec.Command("echo")
}, },