From 042e56e56e644bc9f02780dbf6eeadc40eb57f6a Mon Sep 17 00:00:00 2001 From: Máximo Cuadros Date: Sat, 25 Apr 2020 12:36:40 +0200 Subject: plumbing: object, make renames diff default --- plumbing/object/commit.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'plumbing/object/commit.go') diff --git a/plumbing/object/commit.go b/plumbing/object/commit.go index b37ff61..b27f20b 100644 --- a/plumbing/object/commit.go +++ b/plumbing/object/commit.go @@ -78,6 +78,9 @@ func (c *Commit) Tree() (*Tree, error) { // PatchContext returns the Patch between the actual commit and the provided one. // Error will be return if context expires. Provided context must be non-nil. +// +// NOTE: Since version 5.1.0 the renames are correctly handled, the settings +// used are the recommended options DefaultDiffTreeOptions. func (c *Commit) PatchContext(ctx context.Context, to *Commit) (*Patch, error) { fromTree, err := c.Tree() if err != nil { @@ -93,6 +96,9 @@ func (c *Commit) PatchContext(ctx context.Context, to *Commit) (*Patch, error) { } // 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. func (c *Commit) Patch(to *Commit) (*Patch, error) { return c.PatchContext(context.Background(), to) } -- cgit