From 5e0c546beb48fd04758520bd3c6ff68bcc5b6d16 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Fri, 12 Jun 2015 06:29:22 -0700 Subject: 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 --- git-access.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'git-access.c') 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. -- cgit v1.2.3-70-g09d2