diff options
Diffstat (limited to 'plumbing/object/tree.go')
-rw-r--r-- | plumbing/object/tree.go | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/plumbing/object/tree.go b/plumbing/object/tree.go index 27d8578..ef5e140 100644 --- a/plumbing/object/tree.go +++ b/plumbing/object/tree.go @@ -19,11 +19,12 @@ const ( maxTreeDepth = 1024 startingStackSize = 8 - FileMode os.FileMode = 0100644 - ExecutableMode os.FileMode = 0100755 - SubmoduleMode os.FileMode = 0160000 - SymlinkMode os.FileMode = 0120000 - TreeMode os.FileMode = 0040000 + FileMode os.FileMode = 0100644 + FileModeDeprecated os.FileMode = 0100664 + ExecutableMode os.FileMode = 0100755 + SubmoduleMode os.FileMode = 0160000 + SymlinkMode os.FileMode = 0120000 + TreeMode os.FileMode = 0040000 ) // New errors defined by this package. @@ -298,6 +299,11 @@ func (t *Tree) buildMap() { } } +// Diff returns a list of changes between this tree and the provided one +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 |