FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Bug (or documentation error) in the arguments to Diff.blobToBuffer · Issue #963 · nodegit/nodegit · GitHub

Repository navigation

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

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;

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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


      Back | FazBrowse Home | New Git URL