diff options
author | Máximo Cuadros <mcuadros@gmail.com> | 2020-04-27 12:29:07 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-27 12:29:07 +0200 |
commit | dcaccf7ad7fdb9e5563c8dc8a9b2fc1f3d871581 (patch) | |
tree | d79226ef7900375d1a096b3c10c29298b33b67d6 /plumbing/object/commit.go | |
parent | 2a623877d344e3a4e9f3260ffd55ed80aff1f592 (diff) | |
parent | 5d380d36ddd33b32a5d5ec1b4636605309564ddb (diff) | |
download | go-git-dcaccf7ad7fdb9e5563c8dc8a9b2fc1f3d871581.tar.gz |
Merge pull request #42 from mcuadros/renames-tree
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) } |