From c35e3776dd98ff9002c534ca659eca997508ca37 Mon Sep 17 00:00:00 2001 From: Stefan Haller Date: Mon, 15 Sep 2025 16:53:32 +0200 Subject: [PATCH] Fix staging when using the new useExternalDiffGitConfig config This new config was introduced in 0.55, but it didn't work in the staging view or custom patch building view. --- pkg/commands/git_commands/working_tree.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/commands/git_commands/working_tree.go b/pkg/commands/git_commands/working_tree.go index 4c4d27b8968..e6b066d346f 100644 --- a/pkg/commands/git_commands/working_tree.go +++ b/pkg/commands/git_commands/working_tree.go @@ -267,7 +267,7 @@ func (self *WorkingTreeCommands) WorktreeFileDiffCmdObj(node models.IFile, plain noIndex := !node.GetIsTracked() && !node.GetHasStagedChanges() && !cached && node.GetIsFile() extDiffCmd := self.UserConfig().Git.Paging.ExternalDiffCommand useExtDiff := extDiffCmd != "" && !plain - useExtDiffGitConfig := self.UserConfig().Git.Paging.UseExternalDiffGitConfig + useExtDiffGitConfig := self.UserConfig().Git.Paging.UseExternalDiffGitConfig && !plain cmdArgs := NewGitCmd("diff"). ConfigIf(useExtDiff, "diff.external="+extDiffCmd). @@ -305,7 +305,7 @@ func (self *WorkingTreeCommands) ShowFileDiffCmdObj(from string, to string, reve extDiffCmd := self.UserConfig().Git.Paging.ExternalDiffCommand useExtDiff := extDiffCmd != "" && !plain - useExtDiffGitConfig := self.UserConfig().Git.Paging.UseExternalDiffGitConfig + useExtDiffGitConfig := self.UserConfig().Git.Paging.UseExternalDiffGitConfig && !plain cmdArgs := NewGitCmd("diff"). Config("diff.noprefix=false").