remote-curl: rename shadowed options variable

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>

Jeff King committed Dec 6, 2016 at 13:24 UTC fcaa6e64b3f5eecde2b818385ec6f374f61ee7b2
1 file changed +9 -9
remote-curl.c
+9 -9
@@ -254,7 +254,7 @@ static struct discovery *discover_refs(const char *service, int for_push)
254 struct strbuf effective_url = STRBUF_INIT;
255 struct discovery *last = last_discovery;
256 int http_ret, maybe_smart = 0;
257 - struct http_get_options options;
257 + struct http_get_options http_options;
258
259 if (last && !strcmp(service, last->service))
260 return last;
@@ -271,15 +271,15 @@ static struct discovery *discover_refs(const char *service, int for_push)
271 strbuf_addf(&refs_url, "service=%s", service);
272 }
273
274 - memset(&options, 0, sizeof(options));
275 - options.content_type = &type;
276 - options.charset = &charset;
277 - options.effective_url = &effective_url;
278 - options.base_url = &url;
279 - options.no_cache = 1;
280 - options.keep_error = 1;
274 + memset(&http_options, 0, sizeof(http_options));
275 + http_options.content_type = &type;
276 + http_options.charset = &charset;
277 + http_options.effective_url = &effective_url;
278 + http_options.base_url = &url;
279 + http_options.no_cache = 1;
280 + http_options.keep_error = 1;
281
282 - http_ret = http_get_strbuf(refs_url.buf, &buffer, &options);
282 + http_ret = http_get_strbuf(refs_url.buf, &buffer, &http_options);
283 switch (http_ret) {
284 case HTTP_OK:
285 break;