credentials: suffix the callbacks with `_cb` The credential callbacks should match the other callback naming conventions, using the `_cb` suffix instead of a `_callback` suffix.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
diff --git a/include/git2/deprecated.h b/include/git2/deprecated.h
index 9fe9861..4c11b07 100644
--- a/include/git2/deprecated.h
+++ b/include/git2/deprecated.h
@@ -246,6 +246,21 @@ GIT_EXTERN(void) giterr_set_oom(void);
/**@}*/
+/** @name Deprecated Credential Callback Types
+ *
+ * These types are retained for backward compatibility. The newer
+ * versions of these values should be preferred in all new code.
+ *
+ * There is no plan to remove these backward compatibility values at
+ * this time.
+ */
+/**@{*/
+
+typedef git_cred_sign_cb git_cred_sign_callback;
+typedef git_cred_ssh_interactive_cb git_cred_ssh_interactive_callback;
+
+/**@}*/
+
/** @name Deprecated Transfer Progress Types
*
* These types are retained for backward compatibility. The newer
diff --git a/include/git2/transport.h b/include/git2/transport.h
index 2ba2d7e..91d27c7 100644
--- a/include/git2/transport.h
+++ b/include/git2/transport.h
@@ -165,8 +165,8 @@ typedef struct _LIBSSH2_USERAUTH_KBDINT_PROMPT LIBSSH2_USERAUTH_KBDINT_PROMPT;
typedef struct _LIBSSH2_USERAUTH_KBDINT_RESPONSE LIBSSH2_USERAUTH_KBDINT_RESPONSE;
#endif
-typedef int GIT_CALLBACK(git_cred_sign_callback)(LIBSSH2_SESSION *session, unsigned char **sig, size_t *sig_len, const unsigned char *data, size_t data_len, void **abstract);
-typedef void GIT_CALLBACK(git_cred_ssh_interactive_callback)(const char* name, int name_len, const char* instruction, int instruction_len, int num_prompts, const LIBSSH2_USERAUTH_KBDINT_PROMPT* prompts, LIBSSH2_USERAUTH_KBDINT_RESPONSE* responses, void **abstract);
+typedef int GIT_CALLBACK(git_cred_sign_cb)(LIBSSH2_SESSION *session, unsigned char **sig, size_t *sig_len, const unsigned char *data, size_t data_len, void **abstract);
+typedef void GIT_CALLBACK(git_cred_ssh_interactive_cb)(const char* name, int name_len, const char* instruction, int instruction_len, int num_prompts, const LIBSSH2_USERAUTH_KBDINT_PROMPT* prompts, LIBSSH2_USERAUTH_KBDINT_RESPONSE* responses, void **abstract);
/**
* A ssh key from disk
@@ -185,7 +185,7 @@ typedef struct git_cred_ssh_key {
typedef struct git_cred_ssh_interactive {
git_cred parent;
char *username;
- git_cred_ssh_interactive_callback prompt_callback;
+ git_cred_ssh_interactive_cb prompt_callback;
void *payload;
} git_cred_ssh_interactive;
@@ -197,7 +197,7 @@ typedef struct git_cred_ssh_custom {
char *username;
char *publickey;
size_t publickey_len;
- git_cred_sign_callback sign_callback;
+ git_cred_sign_cb sign_callback;
void *payload;
} git_cred_ssh_custom;
@@ -262,7 +262,7 @@ GIT_EXTERN(int) git_cred_ssh_key_new(
GIT_EXTERN(int) git_cred_ssh_interactive_new(
git_cred **out,
const char *username,
- git_cred_ssh_interactive_callback prompt_callback,
+ git_cred_ssh_interactive_cb prompt_callback,
void *payload);
/**
@@ -300,7 +300,7 @@ GIT_EXTERN(int) git_cred_ssh_custom_new(
const char *username,
const char *publickey,
size_t publickey_len,
- git_cred_sign_callback sign_callback,
+ git_cred_sign_cb sign_callback,
void *payload);
/**
diff --git a/src/transports/cred.c b/src/transports/cred.c
index dfacc96..621cae0 100644
--- a/src/transports/cred.c
+++ b/src/transports/cred.c
@@ -264,7 +264,7 @@ static int git_cred_ssh_key_type_new(
int git_cred_ssh_interactive_new(
git_cred **out,
const char *username,
- git_cred_ssh_interactive_callback prompt_callback,
+ git_cred_ssh_interactive_cb prompt_callback,
void *payload)
{
git_cred_ssh_interactive *c;
@@ -312,7 +312,7 @@ int git_cred_ssh_custom_new(
const char *username,
const char *publickey,
size_t publickey_len,
- git_cred_sign_callback sign_callback,
+ git_cred_sign_cb sign_callback,
void *payload)
{
git_cred_ssh_custom *c;