libgit2

git_blob_create_fromdisk

Version:

Read a file from the filesystem and write its content to the Object Database as a loose blob

Signature

int git_blob_create_fromdisk(git_oid *oid, git_repository *repo, const char *path);

Parameters

In
oid

return the id of the written blob

In
repo

repository where the blob will be written. this repository can be bare or not

const char *
In
path

file from which the blob will be created

Returns

int

0 or an error code

Versions