diff options
Diffstat (limited to 'plumbing/difftree/difftree.go')
-rw-r--r-- | plumbing/difftree/difftree.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/plumbing/difftree/difftree.go b/plumbing/difftree/difftree.go index 76c5f27..d38ad2c 100644 --- a/plumbing/difftree/difftree.go +++ b/plumbing/difftree/difftree.go @@ -12,10 +12,6 @@ func DiffTree(a, b *object.Tree) ([]*Change, error) { from := newTreeNoder(a) to := newTreeNoder(b) - hashEqual := func(a, b noder.Hasher) bool { - return bytes.Equal(a.Hash(), b.Hash()) - } - merkletrieChanges, err := merkletrie.DiffTree(from, to, hashEqual) if err != nil { return nil, err @@ -23,3 +19,7 @@ func DiffTree(a, b *object.Tree) ([]*Change, error) { return newChanges(merkletrieChanges) } + +func hashEqual(a, b noder.Hasher) bool { + return bytes.Equal(a.Hash(), b.Hash()) +} |