libgit2

git_odb_open_ext

Version:

Create a new object database and automatically add loose and packed backends.

Signature

int git_odb_open_ext(git_odb **odb_out, const char *objects_dir, const git_odb_options *opts);

Parameters

Out
odb_out

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

const char *
In
objects_dir

path of the backends' "objects" directory.

In
opts

the options for this object database or NULL for defaults

Returns

int

0 or an error code

Versions