libgit2

git_blob_create_frombuffer

Version:

Write an in-memory buffer to the ODB as a blob

Signature

int git_blob_create_frombuffer(git_oid *oid, git_repository *repo, const void *buffer, size_t len);

Parameters

In
oid

return the oid of the written blob

In
repo

repository where to blob will be written

const void *
In
buffer

data to be written into the blob

size_t
In
len

length of the data

Returns

int

GIT_SUCCESS or an error code

Versions