Skip to content

Commit beadea3

Browse files
stefanhallerkarolzwolak
authored andcommitted
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.
1 parent 0fdb6c4 commit beadea3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/commands/git_commands/working_tree.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ func (self *WorkingTreeCommands) WorktreeFileDiffCmdObj(node models.IFile, plain
267267
noIndex := !node.GetIsTracked() && !node.GetHasStagedChanges() && !cached && node.GetIsFile()
268268
extDiffCmd := self.UserConfig().Git.Paging.ExternalDiffCommand
269269
useExtDiff := extDiffCmd != "" && !plain
270-
useExtDiffGitConfig := self.UserConfig().Git.Paging.UseExternalDiffGitConfig
270+
useExtDiffGitConfig := self.UserConfig().Git.Paging.UseExternalDiffGitConfig && !plain
271271

272272
cmdArgs := NewGitCmd("diff").
273273
ConfigIf(useExtDiff, "diff.external="+extDiffCmd).
@@ -305,7 +305,7 @@ func (self *WorkingTreeCommands) ShowFileDiffCmdObj(from string, to string, reve
305305

306306
extDiffCmd := self.UserConfig().Git.Paging.ExternalDiffCommand
307307
useExtDiff := extDiffCmd != "" && !plain
308-
useExtDiffGitConfig := self.UserConfig().Git.Paging.UseExternalDiffGitConfig
308+
useExtDiffGitConfig := self.UserConfig().Git.Paging.UseExternalDiffGitConfig && !plain
309309

310310
cmdArgs := NewGitCmd("diff").
311311
Config("diff.noprefix=false").

0 commit comments

Comments
 (0)