aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing/object/tree.go
diff options
context:
space:
mode:
authorAntonio Jesus Navarro Perez <antonio@sourced.tech>2017-02-22 15:49:37 +0100
committerAntonio Jesus Navarro Perez <antonio@sourced.tech>2017-02-24 11:08:14 +0100
commitaffc06dec90529073b5a3b76291b953232f034d9 (patch)
tree4300a62bfc3957d51183321254dae3e9d4a314c9 /plumbing/object/tree.go
parentf93e5712a86b96370673a02fa7ffbe5e0aec0c66 (diff)
downloadgo-git-affc06dec90529073b5a3b76291b953232f034d9.tar.gz
plumbing/object: move difftree to object package
- To avoid ciclic dependency errors, we move all the difftree files to object package. - Added Diff method to Tree object.
Diffstat (limited to 'plumbing/object/tree.go')
-rw-r--r--plumbing/object/tree.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/plumbing/object/tree.go b/plumbing/object/tree.go
index 436ac32..d39c315 100644
--- a/plumbing/object/tree.go
+++ b/plumbing/object/tree.go
@@ -299,6 +299,10 @@ func (t *Tree) buildMap() {
}
}
+func (from *Tree) Diff(to *Tree) (Changes, error) {
+ return DiffTree(from, to)
+}
+
// treeEntryIter facilitates iterating through the TreeEntry objects in a Tree.
type treeEntryIter struct {
t *Tree