summaryrefslogtreecommitdiffstats
path: root/pkg/commands/commits.go
diff options
context:
space:
mode:
authorDerTeta <derteta@gmx.de>2021-09-03 22:37:46 +0200
committerJesse Duffield <jessedduffield@gmail.com>2021-12-06 22:37:28 +1100
commitecfafb6fbece9491fbece40286889e625c247745 (patch)
tree3f97d32bcd31a319912286f99aa2a956ea63cf31 /pkg/commands/commits.go
parent14d9e776be401ffc6d27cf4ef9f21a41cd203f41 (diff)
Use `DiffContextSize` in `ShowCmdStr`
Diffstat (limited to 'pkg/commands/commits.go')
-rw-r--r--pkg/commands/commits.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/pkg/commands/commits.go b/pkg/commands/commits.go
index 23a2f99a5..56b8533ac 100644
--- a/pkg/commands/commits.go
+++ b/pkg/commands/commits.go
@@ -61,11 +61,12 @@ func (c *GitCommand) AmendHeadCmdStr() string {
}
func (c *GitCommand) ShowCmdStr(sha string, filterPath string) string {
+ contextSize := c.Config.GetUserConfig().Git.DiffContextSize
filterPathArg := ""
if filterPath != "" {
filterPathArg = fmt.Sprintf(" -- %s", c.OSCommand.Quote(filterPath))
}
- return fmt.Sprintf("git show --submodule --color=%s --no-renames --stat -p %s %s", c.colorArg(), sha, filterPathArg)
+ return fmt.Sprintf("git show --submodule --color=%s --unified=%d --no-renames --stat -p %s %s", c.colorArg(), contextSize, sha, filterPathArg)
}
// Revert reverts the selected commit by sha