public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
* [PATCH 3/3] http: rename HTTP_REAUTH to HTTP_AUTH_RETRY
@ 2012-05-11 13:14 Nelson Benitez Leon
  0 siblings, 0 replies; only message in thread
From: Nelson Benitez Leon @ 2012-05-11 13:14 UTC (permalink / raw)
  To: git; +Cc: Jeff King

The semantics of HTTP_REAUTH have been always more
of a retry rather than a re-authentication, so we
rename it to HTTP_AUTH_RETRY to make it more clear.

Signed-off-by: Nelson Benitez Leon <nbenitezl@gmail•com>
Signed-off-by: Junio C Hamano <gitster@pobox•com>
---
 http.c |    6 +++---
 http.h |    2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/http.c b/http.c
index d34d741..0023119 100644
--- a/http.c
+++ b/http.c
@@ -817,7 +817,7 @@ static int http_request(const char *url, void *result, int target, int options)
 			} else {
 				credential_fill(&http_auth);
 				init_curl_http_auth(slot->curl);
-				ret = HTTP_REAUTH;
+				ret = HTTP_AUTH_RETRY;
 			}
 		} else if (results.http_code == 407) { /* Proxy authentication failure */
 			if (proxy_auth.username && proxy_auth.password) {
@@ -826,7 +826,7 @@ static int http_request(const char *url, void *result, int target, int options)
 			} else {
 				credential_fill(&proxy_auth);
 				set_proxy_auth(slot->curl);
-				ret = HTTP_REAUTH;
+				ret = HTTP_AUTH_RETRY;
 			}
 		} else {
 			if (!curl_errorstr[0])
@@ -856,7 +856,7 @@ static int http_request_reauth(const char *url, void *result, int target,
 
 	do {
 		ret = http_request(url, result, target, options);
-	} while (ret == HTTP_REAUTH);
+	} while (ret == HTTP_AUTH_RETRY);
 
 	return ret;
 }
diff --git a/http.h b/http.h
index 915c286..629bbcf 100644
--- a/http.h
+++ b/http.h
@@ -123,7 +123,7 @@ extern char *get_remote_object_url(const char *url, const char *hex,
 #define HTTP_MISSING_TARGET	1
 #define HTTP_ERROR		2
 #define HTTP_START_FAILED	3
-#define HTTP_REAUTH	4
+#define HTTP_AUTH_RETRY	4
 #define HTTP_NOAUTH	5
 
 /*
-- 
1.7.7.6

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2012-05-11 12:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-11 13:14 [PATCH 3/3] http: rename HTTP_REAUTH to HTTP_AUTH_RETRY Nelson Benitez Leon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox