git_odb_open

Create a new object database and automatically add the two default backends:

- git_odb_backend_loose: read and write loose object files from disk, assuming objects_dir as the Objects folder

- git_odb_backend_pack: read objects from packfiles, assuming objects_dir as the Objects folder which contains a 'pack/' folder with the corresponding data

extern (C) nothrow @nogc
int
git_odb_open

Parameters

out_ libgit2_d.types.git_odb**

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

objects_dir const(char)*

path of the backends' "objects" directory.

Return Value

Type: int

0 or an error code

Meta