summaryrefslogtreecommitdiffstats
path: root/pkg/gui/controllers/helpers
diff options
context:
space:
mode:
authorStefan Haller <stefan@haller-berlin.de>2023-05-18 16:05:08 +0200
committerStefan Haller <stefan@haller-berlin.de>2023-05-19 18:22:28 +0200
commita2778f01c661468caaf2aa2c3476f58e9925dbc4 (patch)
tree61c8e8d8dbc6fbaff4bc8a278c1d8265c1123319 /pkg/gui/controllers/helpers
parentd161afe37f2ef29a2b322e21e4bee38f1ba66d7c (diff)
Disregard the "ignore whitespace" option in the patch building panel
It's not possible to reliably stage things into a custom patch when "ignore whitespace" is on, so always treat it as off here (like we do in the staging panel). It looks like this is a regression that was introduced in 8edad826ca.
Diffstat (limited to 'pkg/gui/controllers/helpers')
-rw-r--r--pkg/gui/controllers/helpers/patch_building_helper.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/pkg/gui/controllers/helpers/patch_building_helper.go b/pkg/gui/controllers/helpers/patch_building_helper.go
index 38f850886..7dd93e6a6 100644
--- a/pkg/gui/controllers/helpers/patch_building_helper.go
+++ b/pkg/gui/controllers/helpers/patch_building_helper.go
@@ -73,7 +73,9 @@ func (self *PatchBuildingHelper) RefreshPatchBuildingPanel(opts types.OnFocusOpt
ref := self.c.Contexts().CommitFiles.CommitFileTreeViewModel.GetRef()
to := ref.RefName()
from, reverse := self.c.Modes().Diffing.GetFromAndReverseArgsForDiff(ref.ParentRefName())
- diff, err := self.c.Git().WorkingTree.ShowFileDiff(from, to, reverse, path, true, self.c.State().GetIgnoreWhitespaceInDiffView())
+ // Passing false for ignoreWhitespace because the patch building panel
+ // doesn't work when whitespace is ignored
+ diff, err := self.c.Git().WorkingTree.ShowFileDiff(from, to, reverse, path, true, false)
if err != nil {
return err
}