Skip to content

Commit 243c329

Browse files
peffgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 6ac964a commit 243c329

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

remote-curl.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,15 +95,15 @@ static struct discovery* discover_refs(const char *service)
9595
struct strbuf buffer = STRBUF_INIT;
9696
struct discovery *last = last_discovery;
9797
char *refs_url;
98-
int http_ret, is_http = 0;
98+
int http_ret, maybe_smart = 0;
9999

100100
if (last && !strcmp(service, last->service))
101101
return last;
102102
free_discovery(last);
103103

104104
strbuf_addf(&buffer, "%sinfo/refs", url);
105105
if (!prefixcmp(url, "http://") || !prefixcmp(url, "https://")) {
106-
is_http = 1;
106+
maybe_smart = 1;
107107
if (!strchr(url, '?'))
108108
strbuf_addch(&buffer, '?');
109109
else
@@ -131,7 +131,7 @@ static struct discovery* discover_refs(const char *service)
131131
last->buf_alloc = strbuf_detach(&buffer, &last->len);
132132
last->buf = last->buf_alloc;
133133

134-
if (is_http && 5 <= last->len && last->buf[4] == '#') {
134+
if (maybe_smart && 5 <= last->len && last->buf[4] == '#') {
135135
/* smart HTTP response; validate that the service
136136
* pkt-line matches our request.
137137
*/

0 commit comments

Comments
 (0)