git_mempack_new

Instantiate a new mempack backend.

The backend must be added to an existing ODB with the highest priority.

git_mempack_new(&mempacker); git_repository_odb(&odb, repository); git_odb_add_backend(odb, mempacker, 999);

Once the backend has been loaded, all writes to the ODB will instead be queued in memory, and can be finalized with git_mempack_dump.

Subsequent reads will also be served from the in-memory store to ensure consistency, until the memory store is dumped.

package extern (C) nothrow @nogc
int
git_mempack_new

Parameters

out_ libgit2_d.types.git_odb_backend**

Pointer where to store the ODB backend

Return Value

Type: int

0 on success; error code otherwise

Meta