Title: Bug (or documentation error) in the arguments to Diff.blobToBuffer · Issue #963 · nodegit/nodegit · GitHub
Open Graph Title: Bug (or documentation error) in the arguments to Diff.blobToBuffer · Issue #963 · nodegit/nodegit
X Title: Bug (or documentation error) in the arguments to Diff.blobToBuffer · Issue #963 · nodegit/nodegit
Description: If you look at the argument list here for Diff.blobToBuffer: http://www.nodegit.org/api/diff/ And then compare that to the argument list that's actually exposed in the code; nodegit/lib/diff.js Line 61 in 83f6aff Diff.blobToBuffer= funct...
Open Graph Description: If you look at the argument list here for Diff.blobToBuffer: http://www.nodegit.org/api/diff/ And then compare that to the argument list that's actually exposed in the code; nodegit/lib/diff.js Lin...
X Description: If you look at the argument list here for Diff.blobToBuffer: http://www.nodegit.org/api/diff/ And then compare that to the argument list that's actually exposed in the code; nodegit/lib/diff.js...
Opengraph URL: https://github.com/nodegit/nodegit/issues/963
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Bug (or documentation error) in the arguments to Diff.blobToBuffer","articleBody":"If you look at the argument list here for `Diff.blobToBuffer`: http://www.nodegit.org/api/diff/\n\nAnd then compare that to the argument list that's actually exposed in the code; https://github.com/nodegit/nodegit/blob/83f6affb4f1305826336fd34b3126d8b35debb2a/lib/diff.js#L61\n\nThey're different, with the actual API lacking the arguments `buffer_len` (and actually computing this value itself) and `payload`.\n\nI'd submit a fix the documentation or the API, but I wasn't sure which one was the buggy one - seems to me like computing buffer_len inside `blobToBuffer` is intentional, but it also seems odd to me (e.g. what happens if the buffer passed in isn't UTF-8? The current code assumes that it is, and I imagine it would compute an incorrect length for non UTF-8 buffers.)\n","author":{"url":"https://github.com/tylerchurch","@type":"Person","name":"tylerchurch"},"datePublished":"2016-03-23T22:03:08.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/963/nodegit/issues/963"}
| 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:e763addf-4af3-8264-1688-3faef893dca9 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B870:14207:50BA0F7:686F031:69751A78 |
| html-safe-nonce | 68c155b3a052b54008976521870e411f3591ed09c6c39c96e1db48bd2aa37e20 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCODcwOjE0MjA3OjUwQkEwRjc6Njg2RjAzMTo2OTc1MUE3OCIsInZpc2l0b3JfaWQiOiI1NDYyNDY3MTM2ODU0NDk3OTEyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 696b3b5e1151b1fb0f25278e171eb3b4947bd38521292686380422b2d0c0010e |
| hovercard-subject-tag | issue:143092087 |
| 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/963/issue_layout |
| twitter:image | https://opengraph.githubassets.com/7f93c44005f05ab0067bc24175e7a8ccc99692f7e640337e114645c55876b34e/nodegit/nodegit/issues/963 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/7f93c44005f05ab0067bc24175e7a8ccc99692f7e640337e114645c55876b34e/nodegit/nodegit/issues/963 |
| og:image:alt | If you look at the argument list here for Diff.blobToBuffer: http://www.nodegit.org/api/diff/ And then compare that to the argument list that's actually exposed in the code; nodegit/lib/diff.js Lin... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | tylerchurch |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4a4bf5f4e28041a9d2e5c107d7d20b78b4294ba261cab243b28167c16a623a1f |
| 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 | 488b30e96dfd057fbbe44c6665ccbc030b729dde |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width