mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-30 03:23:08 +03:00
Remove the PatchOptions.Reverse option
All callers pass false now (except for the tests, which we simply remove), so we don't need the option any more.
This commit is contained in:
@ -182,7 +182,7 @@ func (self *StagingController) applySelection(reverse bool) error {
|
||||
|
||||
firstLineIdx, lastLineIdx := state.SelectedRange()
|
||||
patch := patch.ModifiedPatchForRange(self.c.Log, path, state.GetDiff(), firstLineIdx, lastLineIdx,
|
||||
patch.PatchOptions{Reverse: false, WillBeAppliedReverse: reverse, KeepOriginalHeader: false})
|
||||
patch.PatchOptions{WillBeAppliedReverse: reverse, KeepOriginalHeader: false})
|
||||
|
||||
if patch == "" {
|
||||
return nil
|
||||
@ -232,7 +232,7 @@ func (self *StagingController) editHunk() error {
|
||||
hunk := state.CurrentHunk()
|
||||
patchText := patch.ModifiedPatchForRange(
|
||||
self.c.Log, path, state.GetDiff(), hunk.FirstLineIdx, hunk.LastLineIdx(),
|
||||
patch.PatchOptions{Reverse: false, WillBeAppliedReverse: self.staged, KeepOriginalHeader: false},
|
||||
patch.PatchOptions{WillBeAppliedReverse: self.staged, KeepOriginalHeader: false},
|
||||
)
|
||||
patchFilepath, err := self.git.WorkingTree.SaveTemporaryPatch(patchText)
|
||||
if err != nil {
|
||||
@ -255,7 +255,7 @@ func (self *StagingController) editHunk() error {
|
||||
lineCount := strings.Count(editedPatchText, "\n") + 1
|
||||
newPatchText := patch.ModifiedPatchForRange(
|
||||
self.c.Log, path, editedPatchText, 0, lineCount,
|
||||
patch.PatchOptions{Reverse: false, KeepOriginalHeader: false},
|
||||
patch.PatchOptions{KeepOriginalHeader: false},
|
||||
)
|
||||
|
||||
applyFlags := []string{"cached"}
|
||||
|
Reference in New Issue
Block a user