summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2015-06-12 06:29:22 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-06-12 09:22:35 -0700
commit5e0c546beb48fd04758520bd3c6ff68bcc5b6d16 (patch)
tree361e236ad93d01d4e519eee5abdae77bf1a35c58
parent490d21806e73aa0b366fa4580ae39d14aa16e52e (diff)
downloadsubsurface-5e0c546beb48fd04758520bd3c6ff68bcc5b6d16.tar.gz
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>
-rw-r--r--git-access.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/git-access.c b/git-access.c
index 9483234b0..076bdbae7 100644
--- a/git-access.c
+++ b/git-access.c
@@ -240,11 +240,14 @@ static git_repository *update_local_repo(const char *localdir, const char *remot
else
rt = OTHER;
+ git_repository_config(&conf, repo);
if (rt == HTTPS && getProxyString(&proxy_string)) {
- git_repository_config(&conf, repo);
git_config_set_string(conf, "http.proxy", proxy_string);
free(proxy_string);
+ } else {
+ git_config_set_string(conf, "http.proxy", "");
}
+
/*
* NOTE! Remote errors are reported, but are nonfatal:
* we still successfully return the local repository.