libgit2

git_url_resolve_cb

Deprecated
Version:

Callback to resolve URLs before connecting to remote

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

Deprecations

  • Use `git_remote_set_instance_url`

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