Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Bug (or documentation error) in the arguments to Diff.blobToBuffer #963

Copy link
Copy link
@tylerchurch

Description

@tylerchurch
Issue body actions

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.)

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.