libgit2

git_odb_open

Version:

Open an object database for read/write access.

Signature

int git_odb_open(git_odb **out, const char *objects_dir);

Parameters

In
out

location to store the database pointer, if opened. Set to NULL if the open failed.

const char *
In
objects_dir

path of the database's "objects" directory.

Returns

int

GIT_SUCCESS if the database opened; otherwise an error code describing why the open was not possible.

Versions