remote-curl: rename is_http variable
We don't actually care whether the connection is http or not; what we care about is whether it might be smart http. Rename the variable to be more accurate, which will make it easier to later make smart-http optional. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jeff King committed
Sep 20, 2012 at 13:00 UTC
243c329c1ed8036c6e1b65d3921cb1a3a24e6385
1 file changed
+3
-3
remote-curl.c
+3
-3
@@ -95,7 +95,7 @@ static struct discovery* discover_refs(const char *service)
95
struct strbuf buffer = STRBUF_INIT;
96
struct discovery *last = last_discovery;
97
char *refs_url;
98
- int http_ret, is_http = 0;
98
+ int http_ret, maybe_smart = 0;
99
100
if (last && !strcmp(service, last->service))
101
return last;
@@ -103,7 +103,7 @@ static struct discovery* discover_refs(const char *service)
103
104
strbuf_addf(&buffer, "%sinfo/refs", url);
105
if (!prefixcmp(url, "http://") || !prefixcmp(url, "https://")) {
106
- is_http = 1;
106
+ maybe_smart = 1;
107
if (!strchr(url, '?'))
108
strbuf_addch(&buffer, '?');
109
else
@@ -131,7 +131,7 @@ static struct discovery* discover_refs(const char *service)
131
last->buf_alloc = strbuf_detach(&buffer, &last->len);
132
last->buf = last->buf_alloc;
133
134
- if (is_http && 5 <= last->len && last->buf[4] == '#') {
134
+ if (maybe_smart && 5 <= last->len && last->buf[4] == '#') {
135
/* smart HTTP response; validate that the service
136
* pkt-line matches our request.
137
*/