aboutsummaryrefslogtreecommitdiffstats
path: root/tree_diff.go
diff options
context:
space:
mode:
authorMáximo Cuadros <mcuadros@gmail.com>2016-09-22 23:41:48 +0200
committerMáximo Cuadros <mcuadros@gmail.com>2016-09-22 23:41:48 +0200
commit5913aee5004ff5b32c7926dda3af1f946d203f33 (patch)
treec9b3ce9e4439faf0313749690a3a0e496e32447d /tree_diff.go
parent001bb130fe6186421f3ddcc556854410edd8d95e (diff)
downloadgo-git-5913aee5004ff5b32c7926dda3af1f946d203f33.tar.gz
test coverage improved, Remote.Refs and Repository.Refs returns error, TreeWalker -> TreeIter
Diffstat (limited to 'tree_diff.go')
-rw-r--r--tree_diff.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/tree_diff.go b/tree_diff.go
index 1c613bd..e142bcd 100644
--- a/tree_diff.go
+++ b/tree_diff.go
@@ -140,7 +140,7 @@ func newWithEmpty(a, b *Tree) (Changes, error) {
tree = a
}
- w := NewTreeWalker(tree.r, tree)
+ w := NewTreeIter(tree.r, tree, true)
defer w.Close()
for {
@@ -178,7 +178,7 @@ func newWithEmpty(a, b *Tree) (Changes, error) {
// while taking advantage of the tree hashes to avoid traversing
// subtrees when the hash is equal in both inputs.
func newDiffTree(a, b *Tree) ([]*Change, error) {
- result := make([]*Change, 0)
+ var result []*Change
aChanges, err := newWithEmpty(a, nil)
if err != nil {