libgit2

git_blob_writefile

Version:

Read a file from the working folder of a repository and write it to the Object Database as a loose blob, if such doesn't exist yet.

Signature

int git_blob_writefile(git_oid *written_id, git_repository *repo, const char *path);

Parameters

In
written_id

return the id of the written blob

In
repo

repository where the blob will be written

const char *
In
path

file from which the blob will be created

Returns

int

Versions