libgit2

git_remote_callbacks

Version:

The callback settings structure

Set the callbacks to be called by the remote when informing the user about the progress of the network operations.

Signature

typedef struct git_remote_callbacks { unsigned int version int (*)(const char *, int, void *) progress int (*)(git_remote_completion_type, void *) completion int (*)(git_cred **, const char *, const char *, unsigned int, void *) credentials int (*)(const git_transfer_progress *, void *) transfer_progress int (*)(const char *, const git_oid *, const git_oid *, void *) update_tips void *payload };

Members

unsigned int
version
int (*)(const char *, int, void *)
progress

Textual progress from the remote. Text send over the progress side-band will be passed to this function (this is the 'counting objects' output.

int (*)(git_remote_completion_type, void *)
completion

Completion is called when different parts of the download process are done (currently unused).

int (*)(git_cred **, const char *, const char *, unsigned int, void *)
credentials

This will be called if the remote host requires authentication in order to connect to it.

int (*)(const git_transfer_progress *, void *)
transfer_progress

During the download of new data, this will be regularly called with the current count of progress done by the indexer.

int (*)(const char *, const git_oid *, const git_oid *, void *)
update_tips

Each time a reference is updated locally, this function will be called with information about it.

void *
payload

This will be passed to each of the callbacks in this struct as the last parameter.

Parameter To

Versions