diff options
| author | Edward Thomson <ethomson@edwardthomson.com> | 2021-09-01 20:34:28 -0400 |
|---|---|---|
| committer | Edward Thomson <ethomson@edwardthomson.com> | 2021-09-01 21:20:25 -0400 |
| commit | 3c0f14cc95debb426bd53150aac0eef1a7f625d8 (patch) | |
| tree | 1ae5a9dd0aab3ffec9d7433efff5b97696db9b9d /src/remote.h | |
| parent | f89dc917d7cb1504b651fdb58c96397b3081a80d (diff) | |
| download | libgit2-3c0f14cc95debb426bd53150aac0eef1a7f625d8.tar.gz | |
remote: refactor proxy detection
Update the proxy detection for a remote.
1. Honor `http.<url>.proxy` syntax for a remote's direct URL and
parent URLs.
2. Honor an empty configuration URL to override a proxy configuration.
Add tests to ensure that configuration specificity is honored.
Diffstat (limited to 'src/remote.h')
| -rw-r--r-- | src/remote.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/remote.h b/src/remote.h index ffcefdf7f..ce92db76a 100644 --- a/src/remote.h +++ b/src/remote.h @@ -9,13 +9,13 @@ #include "common.h" -#include "net.h" #include "git2/remote.h" #include "git2/transport.h" #include "git2/sys/transport.h" #include "refspec.h" #include "vector.h" +#include "net.h" #define GIT_REMOTE_ORIGIN "origin" @@ -47,8 +47,7 @@ typedef struct git_remote_connection_opts { int git_remote__connect(git_remote *remote, git_direction direction, const git_remote_callbacks *callbacks, const git_remote_connection_opts *conn); int git_remote__urlfordirection(git_buf *url_out, struct git_remote *remote, int direction, const git_remote_callbacks *callbacks); -int git_remote__get_http_proxy_bypass(git_net_url *url, git_buf *no_proxy_env, bool *bypass); -int git_remote__get_http_proxy(git_remote *remote, bool use_ssl, git_net_url *url, char **proxy_url); +int git_remote__http_proxy(char **out, git_remote *remote, git_net_url *url); git_refspec *git_remote__matching_refspec(git_remote *remote, const char *refname); git_refspec *git_remote__matching_dst_refspec(git_remote *remote, const char *refname); |
