diff options
author | Máximo Cuadros <mcuadros@gmail.com> | 2020-04-25 12:36:40 +0200 |
---|---|---|
committer | Máximo Cuadros <mcuadros@gmail.com> | 2020-04-25 12:36:40 +0200 |
commit | 042e56e56e644bc9f02780dbf6eeadc40eb57f6a (patch) | |
tree | b384712a73068ae5f4945385fac7b45752f6dd7c /plumbing/object/commit.go | |
parent | c9533a6f9f3a6edd0fb7c8c161d4016a6af26bc3 (diff) | |
download | go-git-042e56e56e644bc9f02780dbf6eeadc40eb57f6a.tar.gz |
plumbing: object, make renames diff default
Diffstat (limited to 'plumbing/object/commit.go')
-rw-r--r-- | plumbing/object/commit.go | 6 |
1 files changed, 6 insertions, 0 deletions
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) } |