libgit2

git_url_resolve_cb

Version:

Callback to resolve URLs before connecting to remote

If you return GIT_PASSTHROUGH, you don't need to write anything to url_resolved.

Signature

typedef int git_url_resolve_cb(git_buf *url_resolved, const char *url, int direction, void *payload);

Parameters

In
url_resolved

The buffer to write the resolved URL to

const char *
In
url

The URL to resolve

int
In
direction

GIT_DIRECTION_FETCH or GIT_DIRECTION_PUSH

void *
In
payload

Payload provided by the caller

Returns

int

0 on success, GIT_PASSTHROUGH or an error

Versions