summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2020-01-18 14:14:00 +0000
committerEdward Thomson <ethomson@edwardthomson.com>2020-01-18 14:14:40 +0000
commit917ba7626f9be16ee7bf430cf16d6484717a65d0 (patch)
treefb27f9ebe37f5781706c2b59a3b58a73b58d4dd0
parentb59c71d8a48c2d70e05f82c3a87b49e0b99db810 (diff)
downloadlibgit2-ethomson/typet.tar.gz
auth: update enum type name for consistencyethomson/typet
libgit2 does not use `type_t` suffixes as it's redundant; thus, rename `git_http_authtype_t` to `git_http_auth_t` for consistency.
-rw-r--r--src/transports/auth.c2
-rw-r--r--src/transports/auth.h12
-rw-r--r--src/transports/auth_negotiate.c2
-rw-r--r--src/transports/auth_ntlm.c2
-rw-r--r--src/transports/http.c8
5 files changed, 13 insertions, 13 deletions
diff --git a/src/transports/auth.c b/src/transports/auth.c
index 19127379f..b5f9b4099 100644
--- a/src/transports/auth.c
+++ b/src/transports/auth.c
@@ -47,7 +47,7 @@ on_error:
}
static git_http_auth_context basic_context = {
- GIT_AUTHTYPE_BASIC,
+ GIT_HTTP_AUTH_BASIC,
GIT_CREDTYPE_USERPASS_PLAINTEXT,
0,
NULL,
diff --git a/src/transports/auth.h b/src/transports/auth.h
index aeea6ce4c..762467678 100644
--- a/src/transports/auth.h
+++ b/src/transports/auth.h
@@ -14,16 +14,16 @@
#include "netops.h"
typedef enum {
- GIT_AUTHTYPE_BASIC = 1,
- GIT_AUTHTYPE_NEGOTIATE = 2,
- GIT_AUTHTYPE_NTLM = 4,
-} git_http_authtype_t;
+ GIT_HTTP_AUTH_BASIC = 1,
+ GIT_HTTP_AUTH_NEGOTIATE = 2,
+ GIT_HTTP_AUTH_NTLM = 4,
+} git_http_auth_t;
typedef struct git_http_auth_context git_http_auth_context;
struct git_http_auth_context {
/** Type of scheme */
- git_http_authtype_t type;
+ git_http_auth_t type;
/** Supported credentials */
git_credtype_t credtypes;
@@ -46,7 +46,7 @@ struct git_http_auth_context {
typedef struct {
/** Type of scheme */
- git_http_authtype_t type;
+ git_http_auth_t type;
/** Name of the scheme (as used in the Authorization header) */
const char *name;
diff --git a/src/transports/auth_negotiate.c b/src/transports/auth_negotiate.c
index 26315433d..260fc1ceb 100644
--- a/src/transports/auth_negotiate.c
+++ b/src/transports/auth_negotiate.c
@@ -274,7 +274,7 @@ int git_http_auth_negotiate(
return -1;
}
- ctx->parent.type = GIT_AUTHTYPE_NEGOTIATE;
+ ctx->parent.type = GIT_HTTP_AUTH_NEGOTIATE;
ctx->parent.credtypes = GIT_CREDTYPE_DEFAULT;
ctx->parent.connection_affinity = 1;
ctx->parent.set_challenge = negotiate_set_challenge;
diff --git a/src/transports/auth_ntlm.c b/src/transports/auth_ntlm.c
index 240c9ed81..7d9c5976d 100644
--- a/src/transports/auth_ntlm.c
+++ b/src/transports/auth_ntlm.c
@@ -207,7 +207,7 @@ int git_http_auth_ntlm(
return -1;
}
- ctx->parent.type = GIT_AUTHTYPE_NTLM;
+ ctx->parent.type = GIT_HTTP_AUTH_NTLM;
ctx->parent.credtypes = GIT_CREDTYPE_USERPASS_PLAINTEXT;
ctx->parent.connection_affinity = 1;
ctx->parent.set_challenge = ntlm_set_challenge;
diff --git a/src/transports/http.c b/src/transports/http.c
index b581d6f69..045b72157 100644
--- a/src/transports/http.c
+++ b/src/transports/http.c
@@ -26,9 +26,9 @@
#include "streams/socket.h"
git_http_auth_scheme auth_schemes[] = {
- { GIT_AUTHTYPE_NEGOTIATE, "Negotiate", GIT_CREDTYPE_DEFAULT, git_http_auth_negotiate },
- { GIT_AUTHTYPE_NTLM, "NTLM", GIT_CREDTYPE_USERPASS_PLAINTEXT, git_http_auth_ntlm },
- { GIT_AUTHTYPE_BASIC, "Basic", GIT_CREDTYPE_USERPASS_PLAINTEXT, git_http_auth_basic },
+ { GIT_HTTP_AUTH_NEGOTIATE, "Negotiate", GIT_CREDTYPE_DEFAULT, git_http_auth_negotiate },
+ { GIT_HTTP_AUTH_NTLM, "NTLM", GIT_CREDTYPE_USERPASS_PLAINTEXT, git_http_auth_ntlm },
+ { GIT_HTTP_AUTH_BASIC, "Basic", GIT_CREDTYPE_USERPASS_PLAINTEXT, git_http_auth_basic },
};
static const char *upload_pack_service = "upload-pack";
@@ -78,7 +78,7 @@ typedef struct {
git_net_url url;
git_stream *stream;
- git_http_authtype_t authtypes;
+ git_http_auth_t authtypes;
git_credtype_t credtypes;
git_cred *cred;