Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upNeed to call `walker.start()` for `tree.walk()` not documented except in example #1588
Labels
Comments
|
I ran into this as well. I want to add a couple of specific points:
Here are specific suggestions for improvement:
|
This was referenced May 23, 2019
|
I have attempted to address the issues in the referenced PRs. Please let me know if you have any further suggestions for the changes. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment


System information
https://www.nodegit.org/api/tree/ has an example of how to use
tree.walk(), but it doesn't mention a critical detail, which is mentioned in an example:nodegit/examples/walk-tree.js
Lines 22 to 23 in 1f84d31
It looks like the
start()method is added to the instance here:nodegit/lib/tree.js
Lines 145 to 146 in 1f84d31
It took me quite a while to work out what the problem was, looking at the EventEmitter documentation would not have helped. I'm not sure if subclassing from EventEmitter is a good idea, but having a TreeWalker class where the this is documented would have made it easier to discover.