summaryrefslogtreecommitdiffstats
path: root/pkg/commands/patch/patch_manager.go
diff options
context:
space:
mode:
authorStefan Haller <stefan@haller-berlin.de>2023-03-07 10:16:30 +0100
committerStefan Haller <stefan@haller-berlin.de>2023-03-07 13:40:07 +0100
commit4bd1322941af599f4cf9e406cc72adf7a5bc6ff4 (patch)
treedad041eeac62c1dc6002d745cf7c2d6194d5b0c7 /pkg/commands/patch/patch_manager.go
parent45cf993982f9b56afedd5fd6585c6d6fcd858181 (diff)
Rename WillBeAppliedReverse to Reverse
This is the only "reverse"-related option that is left, so use a less clumsy name for it.
Diffstat (limited to 'pkg/commands/patch/patch_manager.go')
-rw-r--r--pkg/commands/patch/patch_manager.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/pkg/commands/patch/patch_manager.go b/pkg/commands/patch/patch_manager.go
index 7c7197583..3a379b97e 100644
--- a/pkg/commands/patch/patch_manager.go
+++ b/pkg/commands/patch/patch_manager.go
@@ -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
}