mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-28 19:23:05 +00:00
Addressing PR feedback
This commit is contained in:
parent
5f3276c7e6
commit
2af282d835
19
src/remote.c
19
src/remote.c
@ -770,21 +770,14 @@ int git_remote__get_http_proxy(git_remote *remote, bool use_ssl, char **proxy_ur
|
||||
goto found;
|
||||
}
|
||||
|
||||
/* HTTP_PROXY / HTTPS_PROXY environment variables */
|
||||
error = git__getenv(&val, use_ssl ? "HTTPS_PROXY" : "HTTP_PROXY");
|
||||
|
||||
if (error < 0) {
|
||||
if (error != GIT_ENOTFOUND) {
|
||||
return error;
|
||||
}
|
||||
|
||||
giterr_clear();
|
||||
error = 0;
|
||||
}
|
||||
|
||||
/* try lowercase environment variables */
|
||||
/* http_proxy / https_proxy environment variables */
|
||||
error = git__getenv(&val, use_ssl ? "https_proxy" : "http_proxy");
|
||||
|
||||
if (error == GIT_ENOTFOUND) {
|
||||
/* try uppercase environment variables */
|
||||
error = git__getenv(&val, use_ssl ? "HTTPS_PROXY" : "HTTP_PROXY");
|
||||
}
|
||||
|
||||
if (error < 0) {
|
||||
if (error == GIT_ENOTFOUND) {
|
||||
giterr_clear();
|
||||
|
Loading…
Reference in New Issue
Block a user