Title: Need to call `walker.start()` for `tree.walk()` not documented except in example · Issue #1588 · nodegit/nodegit · GitHub
Open Graph Title: Need to call `walker.start()` for `tree.walk()` not documented except in example · Issue #1588 · nodegit/nodegit
X Title: Need to call `walker.start()` for `tree.walk()` not documented except in example · Issue #1588 · nodegit/nodegit
Description: System information node version: v10.13.0 npm or yarn version: 6.4.1 OS/version/architecture: gLinux 64-bit (Google-internal, like Debian Testing) Applicable nodegit version: v0.23.0 built from source https://www.nodegit.org/api/tree/ ha...
Open Graph Description: System information node version: v10.13.0 npm or yarn version: 6.4.1 OS/version/architecture: gLinux 64-bit (Google-internal, like Debian Testing) Applicable nodegit version: v0.23.0 built from sou...
X Description: System information node version: v10.13.0 npm or yarn version: 6.4.1 OS/version/architecture: gLinux 64-bit (Google-internal, like Debian Testing) Applicable nodegit version: v0.23.0 built from sou...
Opengraph URL: https://github.com/nodegit/nodegit/issues/1588
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Need to call `walker.start()` for `tree.walk()` not documented except in example","articleBody":"## System information\r\n - node version: v10.13.0\r\n - npm or yarn version: 6.4.1\r\n - OS/version/architecture: gLinux 64-bit (Google-internal, like Debian Testing)\r\n - Applicable nodegit version: v0.23.0 built from source\r\n\r\nhttps://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:\r\nhttps://github.com/nodegit/nodegit/blob/1f84d31da984cb2c105bf669393438081eede8a9/examples/walk-tree.js#L22-L23\r\n\r\nIt looks like the `start()` method is added to the instance here:\r\nhttps://github.com/nodegit/nodegit/blob/1f84d31da984cb2c105bf669393438081eede8a9/lib/tree.js#L145-L146\r\n\r\nIt 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.","author":{"url":"https://github.com/foolip","@type":"Person","name":"foolip"},"datePublished":"2018-11-20T11:10:27.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/1588/nodegit/issues/1588"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:db69c2b2-3810-0508-ccba-883429f81efb |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B228:A0BA:21AF1C5:2CB302F:6971B540 |
| html-safe-nonce | bfaed52168d2043f5f6f0d7d4b3e5b9b2b1790fe0b2743a49d1ae9a4ada93a02 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMjI4OkEwQkE6MjFBRjFDNToyQ0IzMDJGOjY5NzFCNTQwIiwidmlzaXRvcl9pZCI6IjQyMzA5MjE2NjQ1NzQxMDg5OTIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | b0f6fb88deb55c9697b3d25fb2d500cc1c90cb06ff6a4fee9ea6e3608183989e |
| hovercard-subject-tag | issue:382613470 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/nodegit/nodegit/1588/issue_layout |
| twitter:image | https://opengraph.githubassets.com/e4c05610b80e94e5929780412efc793c96ebddb99588a92eee5128f2d099f578/nodegit/nodegit/issues/1588 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/e4c05610b80e94e5929780412efc793c96ebddb99588a92eee5128f2d099f578/nodegit/nodegit/issues/1588 |
| og:image:alt | System information node version: v10.13.0 npm or yarn version: 6.4.1 OS/version/architecture: gLinux 64-bit (Google-internal, like Debian Testing) Applicable nodegit version: v0.23.0 built from sou... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | foolip |
| hostname | github.com |
| expected-hostname | github.com |
| None | c3b677fea7de290a6c0d1c9ccd6c9909b6a527cf8ee079649e09dc78092d24f1 |
| turbo-cache-control | no-preview |
| go-import | github.com/nodegit/nodegit git https://github.com/nodegit/nodegit.git |
| octolytics-dimension-user_id | 657068 |
| octolytics-dimension-user_login | nodegit |
| octolytics-dimension-repository_id | 1383170 |
| octolytics-dimension-repository_nwo | nodegit/nodegit |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1383170 |
| octolytics-dimension-repository_network_root_nwo | nodegit/nodegit |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 29d7fcca69cafb91ec8a596aaf222fd46e9bc934 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width