1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-06-27 00:51:18 +02:00

Rename WillBeAppliedReverse to Reverse

This is the only "reverse"-related option that is left, so use a less clumsy
name for it.
This commit is contained in:
Stefan Haller
2023-03-07 10:16:30 +01:00
parent 45cf993982
commit 4bd1322941
5 changed files with 41 additions and 41 deletions

View File

@ -162,7 +162,7 @@ func (p *PatchManager) RemoveFileLineRange(filename string, firstLineIdx, lastLi
return nil
}
func (p *PatchManager) renderPlainPatchForFile(filename string, willBeAppliedReverse bool) string {
func (p *PatchManager) renderPlainPatchForFile(filename string, reverse bool) string {
info, err := p.getFileInfo(filename)
if err != nil {
p.Log.Error(err)
@ -178,16 +178,16 @@ func (p *PatchManager) renderPlainPatchForFile(filename string, willBeAppliedRev
// generate a new diff with just the selected lines
return ModifiedPatchForLines(p.Log, filename, info.diff, info.includedLineIndices,
PatchOptions{
WillBeAppliedReverse: willBeAppliedReverse,
KeepOriginalHeader: true,
Reverse: reverse,
KeepOriginalHeader: true,
})
default:
return ""
}
}
func (p *PatchManager) RenderPatchForFile(filename string, plain bool, willBeAppliedReverse bool) string {
patch := p.renderPlainPatchForFile(filename, willBeAppliedReverse)
func (p *PatchManager) RenderPatchForFile(filename string, plain bool, reverse bool) string {
patch := p.renderPlainPatchForFile(filename, reverse)
if plain {
return patch
}