MCPcopy
hub / github.com/jesseduffield/lazygit / ApplyCustomPatch

Method ApplyCustomPatch

pkg/commands/git_commands/patch.go:50–58  ·  view source on GitHub ↗
(reverse bool, turnAddedFilesIntoDiffAgainstEmptyFile bool)

Source from the content-addressed store, hash-verified

48}
49
50func (self *PatchCommands) ApplyCustomPatch(reverse bool, turnAddedFilesIntoDiffAgainstEmptyFile bool) error {
51 patch := self.PatchBuilder.PatchToApply(reverse, turnAddedFilesIntoDiffAgainstEmptyFile)
52
53 return self.ApplyPatch(patch, ApplyPatchOpts{
54 Index: true,
55 ThreeWay: true,
56 Reverse: reverse,
57 })
58}
59
60func (self *PatchCommands) ApplyPatch(patch string, opts ApplyPatchOpts) error {
61 filepath, err := self.SaveTemporaryPatch(patch)

Callers 6

MovePatchIntoIndexMethod · 0.95
handleApplyPatchMethod · 0.80

Calls 2

ApplyPatchMethod · 0.95
PatchToApplyMethod · 0.80

Tested by

no test coverage detected