libgit2

git_mempack_new

Version:

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.

Signature

int git_mempack_new(git_odb_backend **out);

Parameters

In
out

Pointer where to store the ODB backend

Returns

int

0 on success; error code otherwise

Versions