libgit2

git_transport

Version:

Signature

typedef struct git_transport { unsigned int version int (*)(git_transport *, git_transport_message_cb, git_transport_message_cb, git_transport_certificate_check_cb, void *) set_callbacks int (*)(git_transport *, const git_strarray *) set_custom_headers int (*)(git_transport *, const char *, git_cred_acquire_cb, void *, const git_proxy_options *, int, int) connect int (*)(const git_remote_head ***, size_t *, git_transport *) ls int (*)(git_transport *, git_push *, const git_remote_callbacks *) push int (*)(git_transport *, git_repository *, const git_remote_head *const *, size_t) negotiate_fetch int (*)(git_transport *, git_repository *, git_transfer_progress *, git_transfer_progress_cb, void *) download_pack int (*)(git_transport *) is_connected int (*)(git_transport *, int *) read_flags void (*)(git_transport *) cancel int (*)(git_transport *) close void (*)(git_transport *) free };

Members

unsigned int
version

The struct version

int (*)(git_transport *, git_transport_message_cb, git_transport_message_cb, git_transport_certificate_check_cb, void *)
set_callbacks

Set progress and error callbacks

int (*)(git_transport *, const git_strarray *)
set_custom_headers

Set custom headers for HTTP requests

int (*)(git_transport *, const char *, git_cred_acquire_cb, void *, const git_proxy_options *, int, int)
connect

Connect the transport to the remote repository, using the given direction.

int (*)(const git_remote_head ***, size_t *, git_transport *)
ls

Get the list of available references in the remote repository.

This function may be called after a successful call to connect(). The array returned is owned by the transport and must be kept valid until the next call to one of its functions.

int (*)(git_transport *, git_push *, const git_remote_callbacks *)
push

Executes the push whose context is in the git_push object.

int (*)(git_transport *, git_repository *, const git_remote_head *const *, size_t)
negotiate_fetch

Negotiate a fetch with the remote repository.

This function may be called after a successful call to connect(), when the direction is GIT_DIRECTION_FETCH. The function performs a negotiation to calculate the wants list for the fetch.

int (*)(git_transport *, git_repository *, git_transfer_progress *, git_transfer_progress_cb, void *)
download_pack

Start downloading the packfile from the remote repository.

This function may be called after a successful call to negotiate_fetch(), when the direction is GIT_DIRECTION_FETCH.

int (*)(git_transport *)
is_connected

Checks to see if the transport is connected

int (*)(git_transport *, int *)
read_flags

Reads the flags value previously passed into connect()

void (*)(git_transport *)
cancel

Cancels any outstanding transport operation

int (*)(git_transport *)
close

Close the connection to the remote repository.

This function is the reverse of connect() -- it terminates the connection to the remote end.

void (*)(git_transport *)
free

Frees/destructs the git_transport object.

Parameter To

Versions