mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-30 03:23:08 +03:00
Introduce options struct for RenderPatchForFile
We're going to add another argument in the next commit, and that's getting a bit much, especially when most of the arguments are bool and you only see true and false at the call sites without knowing what they mean.
This commit is contained in:
@ -3,6 +3,7 @@ package helpers
|
||||
import (
|
||||
"errors"
|
||||
|
||||
"github.com/jesseduffield/lazygit/pkg/commands/patch"
|
||||
"github.com/jesseduffield/lazygit/pkg/commands/types/enums"
|
||||
"github.com/jesseduffield/lazygit/pkg/gui/patch_exploring"
|
||||
"github.com/jesseduffield/lazygit/pkg/gui/types"
|
||||
@ -80,7 +81,11 @@ func (self *PatchBuildingHelper) RefreshPatchBuildingPanel(opts types.OnFocusOpt
|
||||
return err
|
||||
}
|
||||
|
||||
secondaryDiff := self.c.Git().Patch.PatchBuilder.RenderPatchForFile(path, false, false)
|
||||
secondaryDiff := self.c.Git().Patch.PatchBuilder.RenderPatchForFile(patch.RenderPatchForFileOpts{
|
||||
Filename: path,
|
||||
Plain: false,
|
||||
Reverse: false,
|
||||
})
|
||||
|
||||
context := self.c.Contexts().CustomPatchBuilder
|
||||
|
||||
|
Reference in New Issue
Block a user