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

  1. int git_odb_open(libgit2.types.git_odb** out_, const(char)* objects_dir, const(.git_odb_options)* opts)
  2. int git_odb_open(libgit2.types.git_odb** out_, const(char)* objects_dir)
    version(!GIT_EXPERIMENTAL_SHA256)
    extern (C) nothrow @nogc public
    int
    git_odb_open

Parameters

out_ libgit2.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