libgit2

git_odb_write_pack

Version:

Open a stream for writing a pack file to the ODB.

If the ODB layer understands pack files, then the given packfile will likely be streamed directly to disk (and a corresponding index created). If the ODB layer does not understand pack files, the objects will be stored in whatever format the ODB layer uses.

See

Signature

int git_odb_write_pack(git_odb_writepack **out, git_odb *db, git_indexer_progress_cb progress_cb, void *progress_payload);

Parameters

In
out

pointer to the writepack functions

In
db

object database where the stream will read from

In
progress_cb

function to call with progress information. Be aware that this is called inline with network and indexing operations, so performance may be affected.

void *
In
progress_payload

payload for the progress callback

Returns

int

0 or an error code.

Versions