]> git.ipfire.org Git - thirdparty/git.git/commitdiff
remote-curl: rename shadowed options variable
authorJeff King <peff@peff.net>
Tue, 6 Dec 2016 18:24:38 +0000 (13:24 -0500)
committerJunio C Hamano <gitster@pobox.com>
Tue, 6 Dec 2016 20:32:48 +0000 (12:32 -0800)
The discover_refs() function has a local "options" variable
to hold the http_get_options we pass to http_get_strbuf().
But this shadows the global "struct options" that holds our
program-level options, which cannot be accessed from this
function.

Let's give the local one a more descriptive name so we can
tell the two apart.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
remote-curl.c

index 6b83b7783e9c62fcf623acd0ba034dd1c0b9bd10..e3803daa3e0d1635e61490c4d0d60316e2ca06da 100644 (file)
@@ -254,7 +254,7 @@ static struct discovery *discover_refs(const char *service, int for_push)
        struct strbuf effective_url = STRBUF_INIT;
        struct discovery *last = last_discovery;
        int http_ret, maybe_smart = 0;
-       struct http_get_options options;
+       struct http_get_options http_options;
 
        if (last && !strcmp(service, last->service))
                return last;
@@ -271,15 +271,15 @@ static struct discovery *discover_refs(const char *service, int for_push)
                strbuf_addf(&refs_url, "service=%s", service);
        }
 
-       memset(&options, 0, sizeof(options));
-       options.content_type = &type;
-       options.charset = &charset;
-       options.effective_url = &effective_url;
-       options.base_url = &url;
-       options.no_cache = 1;
-       options.keep_error = 1;
+       memset(&http_options, 0, sizeof(http_options));
+       http_options.content_type = &type;
+       http_options.charset = &charset;
+       http_options.effective_url = &effective_url;
+       http_options.base_url = &url;
+       http_options.no_cache = 1;
+       http_options.keep_error = 1;
 
-       http_ret = http_get_strbuf(refs_url.buf, &buffer, &options);
+       http_ret = http_get_strbuf(refs_url.buf, &buffer, &http_options);
        switch (http_ret) {
        case HTTP_OK:
                break;