mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
Cloud storage: Unset the proxy if none is configured
The settings are stored in the local cache repository - so without resetting it a proxy would stay configured even if it was disabled in the Subsurface preferences. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
490d21806e
commit
5e0c546beb
1 changed files with 4 additions and 1 deletions
|
@ -240,11 +240,14 @@ static git_repository *update_local_repo(const char *localdir, const char *remot
|
||||||
else
|
else
|
||||||
rt = OTHER;
|
rt = OTHER;
|
||||||
|
|
||||||
if (rt == HTTPS && getProxyString(&proxy_string)) {
|
|
||||||
git_repository_config(&conf, repo);
|
git_repository_config(&conf, repo);
|
||||||
|
if (rt == HTTPS && getProxyString(&proxy_string)) {
|
||||||
git_config_set_string(conf, "http.proxy", proxy_string);
|
git_config_set_string(conf, "http.proxy", proxy_string);
|
||||||
free(proxy_string);
|
free(proxy_string);
|
||||||
|
} else {
|
||||||
|
git_config_set_string(conf, "http.proxy", "");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* NOTE! Remote errors are reported, but are nonfatal:
|
* NOTE! Remote errors are reported, but are nonfatal:
|
||||||
* we still successfully return the local repository.
|
* we still successfully return the local repository.
|
||||||
|
|
Loading…
Reference in a new issue