Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions include/git2/sys/transport.h
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,16 @@ GIT_EXTERN(int) git_transport_smart_certificate_check(git_transport *transport,
*/
GIT_EXTERN(int) git_transport_smart_credentials(git_cred **out, git_transport *transport, const char *user, int methods);

/**
* Get a copy of the proxy options
*
* The url is copied and must be freed by the caller.
*
* @param out options struct to fill
* @param transport the transport to extract the data from.
*/
GIT_EXTERN(int) git_transport_smart_proxy_options(git_proxy_options *out, git_transport *transport);

/*
*** End of base transport interface ***
*** Begin interface for subtransports for the smart transport ***
Expand Down
6 changes: 6 additions & 0 deletions src/transports/smart.c
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,12 @@ int git_transport_smart_credentials(git_cred **out, git_transport *transport, co
return t->cred_acquire_cb(out, t->url, user, methods, t->cred_acquire_payload);
}

int git_transport_smart_proxy_options(git_proxy_options *out, git_transport *transport)
{
transport_smart *t = (transport_smart *) transport;
return git_proxy_options_dup(out, &t->proxy);
}

int git_transport_smart(git_transport **out, git_remote *owner, void *param)
{
transport_smart *t;
Expand Down