1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-30 03:23:08 +03:00

rename patch manager to patch builder

This commit is contained in:
Jesse Duffield
2023-03-19 16:09:03 +11:00
parent 7ce3165afa
commit 60f902f026
15 changed files with 83 additions and 84 deletions

View File

@ -106,7 +106,7 @@ func (self *PatchBuildingController) toggleSelection() error {
self.context().GetMutex().Lock()
defer self.context().GetMutex().Unlock()
toggleFunc := self.git.Patch.PatchManager.AddFileLineRange
toggleFunc := self.git.Patch.PatchBuilder.AddFileLineRange
filename := self.contexts.CommitFiles.GetSelectedPath()
if filename == "" {
return nil
@ -114,13 +114,13 @@ func (self *PatchBuildingController) toggleSelection() error {
state := self.context().GetState()
includedLineIndices, err := self.git.Patch.PatchManager.GetFileIncLineIndices(filename)
includedLineIndices, err := self.git.Patch.PatchBuilder.GetFileIncLineIndices(filename)
if err != nil {
return err
}
currentLineIsStaged := lo.Contains(includedLineIndices, state.GetSelectedLineIdx())
if currentLineIsStaged {
toggleFunc = self.git.Patch.PatchManager.RemoveFileLineRange
toggleFunc = self.git.Patch.PatchBuilder.RemoveFileLineRange
}
// add range of lines to those set for the file