summaryrefslogtreecommitdiff
path: root/http.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-12-07 15:13:02 -0800
committerJunio C Hamano <gitster@pobox.com>2008-12-07 15:13:02 -0800
commit3a59bb22db24ff90c173ffb462fe67902a213d96 (patch)
treeaa4f56dcd531c232ea18a5242805e86cd50ced76 /http.c
parent2dd620286e84e4e76226a3511af6d14755b8c809 (diff)
parent1c2ed59de2d14ad6ee9daa4d4f7254297d9a3830 (diff)
downloadgit-3a59bb22db24ff90c173ffb462fe67902a213d96.tar.gz
Merge branch 'maint'
* maint: GIT 1.6.0.5 "git diff <tree>{3,}": do not reverse order of arguments tag: delete TAG_EDITMSG only on successful tag gitweb: Make project specific override for 'grep' feature work http.c: use 'git_config_string' to get 'curl_http_proxy' fetch-pack: Avoid memcpy() with src==dst
Diffstat (limited to 'http.c')
-rw-r--r--http.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/http.c b/http.c
index ed59b79709..ee58799ca8 100644
--- a/http.c
+++ b/http.c
@@ -24,7 +24,7 @@ static const char *ssl_cainfo = NULL;
static long curl_low_speed_limit = -1;
static long curl_low_speed_time = -1;
static int curl_ftp_no_epsv = 0;
-static char *curl_http_proxy = NULL;
+static const char *curl_http_proxy = NULL;
static struct curl_slist *pragma_header;
@@ -149,11 +149,8 @@ static int http_options(const char *var, const char *value, void *cb)
return 0;
}
if (!strcmp("http.proxy", var)) {
- if (curl_http_proxy == NULL) {
- if (!value)
- return config_error_nonbool(var);
- curl_http_proxy = xstrdup(value);
- }
+ if (curl_http_proxy == NULL)
+ return git_config_string(&curl_http_proxy, var, value);
return 0;
}
@@ -309,7 +306,7 @@ void http_cleanup(void)
pragma_header = NULL;
if (curl_http_proxy) {
- free(curl_http_proxy);
+ free((void *)curl_http_proxy);
curl_http_proxy = NULL;
}
}