From 98c569749fb6eb7d55acd8338e633dc583b3ca2e Mon Sep 17 00:00:00 2001 From: Stefan Haller Date: Tue, 23 Apr 2024 12:42:46 +0200 Subject: Use git.paging.colorArg in diffing mode diff --- pkg/commands/git_commands/diff.go | 8 ++++++-- 1 file 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(), -- cgit v1.2.3