aboutsummaryrefslogtreecommitdiffstats
path: root/tree_walker.go
diff options
context:
space:
mode:
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