Code

api-parse-options.txt: Introduce documentation for parse options API
[git.git] / http.c
diff --git a/http.c b/http.c
index acf746a12da0f0b5e3fe3f097a6626e17da8852c..105dc93843ba1f01ea0d40c63dd174e879f1a25a 100644 (file)
--- a/http.c
+++ b/http.c
@@ -90,7 +90,7 @@ static void process_curl_messages(void)
 }
 #endif
 
-static int http_options(const char *var, const char *value)
+static int http_options(const char *var, const char *value, void *cb)
 {
        if (!strcmp("http.sslverify", var)) {
                if (curl_ssl_verify == -1) {
@@ -169,7 +169,7 @@ static int http_options(const char *var, const char *value)
        }
 
        /* Fall back on the default ones */
-       return git_default_config(var, value);
+       return git_default_config(var, value, cb);
 }
 
 static CURL* get_curl_handle(void)
@@ -263,7 +263,7 @@ void http_init(struct remote *remote)
        if (low_speed_time != NULL)
                curl_low_speed_time = strtol(low_speed_time, NULL, 10);
 
-       git_config(http_options);
+       git_config(http_options, NULL);
 
        if (curl_ssl_verify == -1)
                curl_ssl_verify = 1;
@@ -583,7 +583,7 @@ static char *quote_ref_url(const char *base, const char *ref)
        int len, baselen, ch;
 
        baselen = strlen(base);
-       len = baselen + 7; /* "/refs/" + NUL */
+       len = baselen + 2; /* '/' after base and terminating NUL */
        for (cp = ref; (ch = *cp) != 0; cp++, len++)
                if (needs_quote(ch))
                        len += 2; /* extra two hex plus replacement % */