Code

builtin-fetch.c (store_updated_refs): Honor update_local_ref() return value
[git.git] / http.c
diff --git a/http.c b/http.c
index c8df13b8ae186d4565760d3b25103267713f7229..2a21ccbb76351d108301d2b9c334e2c5a5feacd9 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;
@@ -626,7 +626,10 @@ int http_fetch_ref(const char *base, struct ref *ref)
                        strbuf_rtrim(&buffer);
                        if (buffer.len == 40)
                                ret = get_sha1_hex(buffer.buf, ref->old_sha1);
-                       else
+                       else if (!prefixcmp(buffer.buf, "ref: ")) {
+                               ref->symref = xstrdup(buffer.buf + 5);
+                               ret = 0;
+                       } else
                                ret = 1;
                } else {
                        ret = error("Couldn't get %s for %s\n%s",