libgit2

git_transport

Version:

Signature

typedef struct git_transport { unsigned int version int (*)(git_transport *, const char *, int, const git_remote_connect_options *) connect int (*)(git_transport *, const git_remote_connect_options *) set_connect_opts int (*)(unsigned int *, git_transport *) capabilities int (*)(const git_remote_head ***, size_t *, git_transport *) ls int (*)(git_transport *, git_push *) push int (*)(git_transport *, git_repository *, const git_remote_head *const *, size_t) negotiate_fetch int (*)(git_transport *, git_repository *, git_indexer_progress *) download_pack int (*)(git_transport *) is_connected void (*)(git_transport *) cancel int (*)(git_transport *) close void (*)(git_transport *) free };

Members

unsigned int
version

The struct version

int (*)(git_transport *, const char *, int, const git_remote_connect_options *)
connect

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

int (*)(git_transport *, const git_remote_connect_options *)
set_connect_opts

Resets the connect options for the given transport. This is useful for updating settings or callbacks for an already connected transport.

int (*)(unsigned int *, git_transport *)
capabilities

Gets the capabilities for this remote repository.

This function may be called after a successful call to connect().

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 *)
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_indexer_progress *)
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

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