From 590d6f2f80144956619e328e03f2200072ba2df7 Mon Sep 17 00:00:00 2001 From: Matthijs Kooijman Date: Sun, 22 Mar 2026 18:29:36 +0100 Subject: [PATCH] Fix patch commands when git config has color=always This is the same option as used by pkg.commands.git_commands.diff.GetDiff(). --- pkg/commands/git_commands/patch.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/commands/git_commands/patch.go b/pkg/commands/git_commands/patch.go index 2a979dd54..f40f7fa6f 100644 --- a/pkg/commands/git_commands/patch.go +++ b/pkg/commands/git_commands/patch.go @@ -346,7 +346,7 @@ func (self *PatchCommands) PullPatchIntoNewCommitBefore( func (self *PatchCommands) diffHeadAgainstCommit(commit *models.Commit) (string, error) { cmdArgs := NewGitCmd("diff"). Config("diff.noprefix=false"). - Arg("--no-ext-diff"). + Arg("--no-ext-diff", "--no-color"). Arg("HEAD.." + commit.Hash()). ToArgv()