MCPcopy Index your code
hub / github.com/go-git/go-git / Patch

Method Patch

plumbing/object/commit.go:175–177  ·  view source on GitHub ↗

Patch returns the Patch between the actual commit and the provided one. NOTE: Since version 5.1.0 the renames are correctly handled, the settings used are the recommended options DefaultDiffTreeOptions.

(to *Commit)

Source from the content-addressed store, hash-verified

173// NOTE: Since version 5.1.0 the renames are correctly handled, the settings
174// used are the recommended options DefaultDiffTreeOptions.
175func (c *Commit) Patch(to *Commit) (*Patch, error) {
176 return c.PatchContext(context.Background(), to)
177}
178
179// Parents return a CommitIter to the parent Commits.
180func (c *Commit) Parents() CommitIter {

Callers

nothing calls this directly

Calls 1

PatchContextMethod · 0.95

Tested by

no test coverage detected