MCPcopy Create free account
hub / github.com/cwarden/git-add--interactive / ApplyPatch

Method ApplyPatch

internal/git/patch.go:250–253  ·  view source on GitHub ↗
(patch []byte, mode PatchMode)

Source from the content-addressed store, hash-verified

248}
249
250func (r *Repository) ApplyPatch(patch []byte, mode PatchMode) error {
251 cmd := append(mode.ApplyCmd, "--allow-overlap")
252 return r.RunCommandWithStdin(patch, cmd...)
253}
254
255func (r *Repository) CheckPatch(patch []byte, mode PatchMode) error {
256 cmd := append(mode.CheckCmd, "--allow-overlap")

Callers 2

patchUpdateFileMethod · 0.80
acceptAllHunksInFileMethod · 0.80

Calls 1

RunCommandWithStdinMethod · 0.95

Tested by

no test coverage detected