MCPcopy Create free account
hub / github.com/go-git/go-git / Patch

Method Patch

plumbing/object/commit.go:121–123  ·  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

119// NOTE: Since version 5.1.0 the renames are correctly handled, the settings
120// used are the recommended options DefaultDiffTreeOptions.
121func (c *Commit) Patch(to *Commit) (*Patch, error) {
122 return c.PatchContext(context.Background(), to)
123}
124
125// Parents return a CommitIter to the parent Commits.
126func (c *Commit) Parents() CommitIter {

Callers

nothing calls this directly

Calls 1

PatchContextMethod · 0.95

Tested by

no test coverage detected