Git-Raw
view release on metacpan or search on metacpan
deps/libgit2/include/git2/remote.h view on Meta::CPAN
typedef int GIT_CALLBACK(git_push_update_reference_cb)(const char *refname, const char *status, void *data);
#ifndef GIT_DEPRECATE_HARD
/**
* Callback to resolve URLs before connecting to remote
*
* If you return GIT_PASSTHROUGH, you don't need to write anything to
* url_resolved.
*
* @param url_resolved The buffer to write the resolved URL to
* @param url The URL to resolve
* @param direction GIT_DIRECTION_FETCH or GIT_DIRECTION_PUSH
* @param payload Payload provided by the caller
* @return 0 on success, GIT_PASSTHROUGH or an error
* @deprecated Use `git_remote_set_instance_url`
*/
typedef int GIT_CALLBACK(git_url_resolve_cb)(git_buf *url_resolved, const char *url, int direction, void *payload);
#endif
/**
* Callback invoked immediately before we attempt to connect to the
* given url. Callers may change the URL before the connection by
* calling `git_remote_set_instance_url` in the callback.
*
* @param remote The remote to be connected
* @param direction GIT_DIRECTION_FETCH or GIT_DIRECTION_PUSH
* @param payload Payload provided by the caller
* @return 0 on success, or an error
*/
typedef int GIT_CALLBACK(git_remote_ready_cb)(git_remote *remote, int direction, void *payload);
/**
* The callback settings structure
*
* Set the callbacks to be called by the remote when informing the user
* about the progress of the network operations.
*/
struct git_remote_callbacks {
unsigned int version; /**< The version */
/**
* Textual progress from the remote. Text send over the
* progress side-band will be passed to this function (this is
* the 'counting objects' output).
*/
git_transport_message_cb sideband_progress;
/**
* Completion is called when different parts of the download
* process are done (currently unused).
*/
int GIT_CALLBACK(completion)(git_remote_completion_t type, void *data);
/**
* This will be called if the remote host requires
* authentication in order to connect to it.
*
* Returning GIT_PASSTHROUGH will make libgit2 behave as
* though this field isn't set.
*/
git_credential_acquire_cb credentials;
/**
* If cert verification fails, this will be called to let the
* user make the final decision of whether to allow the
* connection to proceed. Returns 0 to allow the connection
* or a negative value to indicate an error.
*/
git_transport_certificate_check_cb certificate_check;
/**
* During the download of new data, this will be regularly
* called with the current count of progress done by the
* indexer.
*/
git_indexer_progress_cb transfer_progress;
/**
* Each time a reference is updated locally, this function
* will be called with information about it.
*/
int GIT_CALLBACK(update_tips)(const char *refname, const git_oid *a, const git_oid *b, void *data);
/**
* Function to call with progress information during pack
* building. Be aware that this is called inline with pack
* building operations, so performance may be affected.
*/
git_packbuilder_progress pack_progress;
/**
* Function to call with progress information during the
* upload portion of a push. Be aware that this is called
* inline with pack building operations, so performance may be
* affected.
*/
git_push_transfer_progress_cb push_transfer_progress;
/**
* See documentation of git_push_update_reference_cb
*/
git_push_update_reference_cb push_update_reference;
/**
* Called once between the negotiation step and the upload. It
* provides information about what updates will be performed.
*/
git_push_negotiation push_negotiation;
/**
* Create the transport to use for this operation. Leave NULL
* to auto-detect.
*/
git_transport_cb transport;
/**
* Callback when the remote is ready to connect.
*/
git_remote_ready_cb remote_ready;
/**
( run in 1.355 second using v1.01-cache-2.11-cpan-75ffa21a3d4 )