diff options
Diffstat (limited to 'pkg/commands/files.go')
-rw-r--r-- | pkg/commands/files.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/pkg/commands/files.go b/pkg/commands/files.go index 07c4c4d28..bf692595a 100644 --- a/pkg/commands/files.go +++ b/pkg/commands/files.go @@ -207,6 +207,7 @@ func (c *GitCommand) WorktreeFileDiffCmdStr(node models.IFile, plain bool, cache colorArg := c.colorArg() quotedPath := c.OSCommand.Quote(node.GetPath()) ignoreWhitespaceArg := "" + contextSize := c.Config.GetUserConfig().Git.DiffContextSize if cached { cachedArg = "--cached" } @@ -220,7 +221,7 @@ func (c *GitCommand) WorktreeFileDiffCmdStr(node models.IFile, plain bool, cache ignoreWhitespaceArg = "--ignore-all-space" } - return fmt.Sprintf("git diff --submodule --no-ext-diff --color=%s %s %s %s %s", colorArg, ignoreWhitespaceArg, cachedArg, trackedArg, quotedPath) + return fmt.Sprintf("git diff --submodule --no-ext-diff --unified=%d --color=%s %s %s %s %s", contextSize, colorArg, ignoreWhitespaceArg, cachedArg, trackedArg, quotedPath) } func (c *GitCommand) ApplyPatch(patch string, flags ...string) error { |