Title: Fix Tree.Prototype.entryById and .getEntry by miachenmtl · Pull Request #1731 · nodegit/nodegit · GitHub
Open Graph Title: Fix Tree.Prototype.entryById and .getEntry by miachenmtl · Pull Request #1731 · nodegit/nodegit
X Title: Fix Tree.Prototype.entryById and .getEntry by miachenmtl · Pull Request #1731 · nodegit/nodegit
Description: I was experiencing a bug where Entry.prototype.path() was not working when a tree entry was fetched using Tree.prototype.entryById. This PR should resolve the bug. I also noticed that entryByPath had the same problem, but in this case, getEntry adds the necessary properties, so I renamed entryByPath to _entryByPath following the same pattern as entryByName and _entryByName. entryById now follows pattern of entryByName and entryByIndex where the parent property is added to the entry. The description notes that it does not recurse. entryByPath renamed to _entryByPath since getEntry should be used instead. Simple test for entryById added. Setup of commits used in test for TreeEntry.walk moved to test setup so getEntry can test searching by path as well.
Open Graph Description: I was experiencing a bug where Entry.prototype.path() was not working when a tree entry was fetched using Tree.prototype.entryById. This PR should resolve the bug. I also noticed that entryByPath h...
X Description: I was experiencing a bug where Entry.prototype.path() was not working when a tree entry was fetched using Tree.prototype.entryById. This PR should resolve the bug. I also noticed that entryByPath h...
Opengraph URL: https://github.com/nodegit/nodegit/pull/1731
X: @github
Domain: patch-diff.githubusercontent.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:612e2ad6-f776-3c94-f992-6d530e0551b0 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | AC98:18466E:180A293:2197238:6970DCBD |
| html-safe-nonce | 88a18e2dab17836afb8dfa30dc86a7bb3f1f0211df13b4226145daa464e06ecd |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQzk4OjE4NDY2RToxODBBMjkzOjIxOTcyMzg6Njk3MERDQkQiLCJ2aXNpdG9yX2lkIjoiNDY1MDUxNjQ3NDY2MzMxMzI1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | ce2c6b0370b4a31cf7d1876c10d1da231757c40c24389484253e5c247bb0838d |
| hovercard-subject-tag | pull_request:323548757 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,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/nodegit/nodegit/pull/1731/files |
| twitter:image | https://avatars.githubusercontent.com/u/21199519?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/21199519?s=400&v=4 |
| og:image:alt | I was experiencing a bug where Entry.prototype.path() was not working when a tree entry was fetched using Tree.prototype.entryById. This PR should resolve the bug. I also noticed that entryByPath h... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9203e7efc62065329c3b7015a1e6d16fc14bce440abec7b0d3cbe9e4fb1e2e4 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| 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 full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | eb3c92b74ae48a78cffd8700b8eb5f60bad61528 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width