aboutsummaryrefslogtreecommitdiffstats
path: root/tree_walker.go
diff options
context:
space:
mode:
authorMáximo Cuadros <mcuadros@gmail.com>2016-08-15 23:09:33 +0200
committerMáximo Cuadros <mcuadros@gmail.com>2016-08-15 23:09:33 +0200
commit6b9a59be60de5b66aee14e9160ace80734008eca (patch)
treec302776360b0fd4f774f67f177870fda478b4258 /tree_walker.go
parented2e3b299e03e4bfd4c37bf5232e9fde05c0600d (diff)
downloadgo-git-6b9a59be60de5b66aee14e9160ace80734008eca.tar.gz
core: *Iter.ForEach method
Diffstat (limited to 'tree_walker.go')
-rw-r--r--tree_walker.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/tree_walker.go b/tree_walker.go
index 9bc1421..5568e1b 100644
--- a/tree_walker.go
+++ b/tree_walker.go
@@ -15,6 +15,7 @@ type TreeWalker struct {
base string
r *Repository
+ t *Tree
}
// NewTreeWalker returns a new TreeWalker for the given repository and tree.
@@ -26,6 +27,7 @@ func NewTreeWalker(r *Repository, t *Tree) *TreeWalker {
stack: make([]treeEntryIter, 0, startingStackSize),
base: "",
r: r,
+ t: t,
}
w.stack = append(w.stack, treeEntryIter{t, 0})
return &w