summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Haller <stefan@haller-berlin.de>2024-04-23 12:42:46 +0200
committerStefan Haller <stefan@haller-berlin.de>2024-04-25 08:50:30 +0200
commit98c569749fb6eb7d55acd8338e633dc583b3ca2e (patch)
tree1ed024d0aea04475422b20eb92d3f3ff41e649d7
parent047380f311bec593401cad3680f4dd7db090e215 (diff)
Use git.paging.colorArg in diffing mode diff
-rw-r--r--pkg/commands/git_commands/diff.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/pkg/commands/git_commands/diff.go b/pkg/commands/git_commands/diff.go
index 0e5c69037..4720d5404 100644
--- a/pkg/commands/git_commands/diff.go
+++ b/pkg/commands/git_commands/diff.go
@@ -1,6 +1,10 @@
package git_commands
-import "github.com/jesseduffield/lazygit/pkg/commands/oscommands"
+import (
+ "fmt"
+
+ "github.com/jesseduffield/lazygit/pkg/commands/oscommands"
+)
type DiffCommands struct {
*GitCommon
@@ -18,7 +22,7 @@ func (self *DiffCommands) DiffCmdObj(diffArgs []string) oscommands.ICmdObj {
Config("diff.noprefix=false").
Arg("--submodule").
Arg("--no-ext-diff").
- Arg("--color").
+ Arg(fmt.Sprintf("--color=%s", self.UserConfig.Git.Paging.ColorArg)).
Arg(diffArgs...).
Dir(self.repoPaths.worktreePath).
ToArgv(),