libgit2

git_blob_create_from_buffer

Version:

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

Signature

int git_blob_create_from_buffer(git_oid *id, git_repository *repo, const void *buffer, size_t len);

Parameters

In
id

return the id 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

0 or an error code

Versions