git_mempack_dump

Dump all the queued in-memory writes to a packfile.

The contents of the packfile will be stored in the given buffer. It is the caller's responsibility to ensure that the generated packfile is available to the repository (e.g. by writing it to disk, or doing something crazy like distributing it across several copies of the repository over a network).

Once the generated packfile is available to the repository, call git_mempack_reset to cleanup the memory store.

Calling git_mempack_reset before the packfile has been written to disk will result in an inconsistent repository (the objects in the memory store won't be accessible).

@param pack Buffer where to store the raw packfile @param repo The active repository where the backend is loaded @param backend The mempack backend @return 0 on success; error code otherwise

Meta