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;
|
Diff.blobToBuffer= function( |
They're different, with the actual API lacking the arguments buffer_len (and actually computing this value itself) and payload.
I'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.)
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
They're different, with the actual API lacking the arguments
buffer_len(and actually computing this value itself) andpayload.I'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
blobToBufferis 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.)