mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-12 12:55:47 +02:00
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
.
This commit is contained in:
parent
d161afe37f
commit
a2778f01c6
1 changed files with 3 additions and 1 deletions
|
@ -73,7 +73,9 @@ func (self *PatchBuildingHelper) RefreshPatchBuildingPanel(opts types.OnFocusOpt
|
||||||
ref := self.c.Contexts().CommitFiles.CommitFileTreeViewModel.GetRef()
|
ref := self.c.Contexts().CommitFiles.CommitFileTreeViewModel.GetRef()
|
||||||
to := ref.RefName()
|
to := ref.RefName()
|
||||||
from, reverse := self.c.Modes().Diffing.GetFromAndReverseArgsForDiff(ref.ParentRefName())
|
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 {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue