libgit2

git_blob_new

Version:

Create a new in-memory git_blob.

The blob object must be manually filled using the 'set_rawcontent' methods before it can be written back to disk.

Signature

int git_blob_new(git_blob **blob, git_repository *repo);

Parameters

In
blob

pointer to the new blob

In
repo

The repository where the object will reside

Returns

int

0 on success; error code otherwise

Versions