doc: small fixups & additions
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 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151
diff --git a/include/git2/checkout.h b/include/git2/checkout.h
index 7ba0df8..485bae6 100644
--- a/include/git2/checkout.h
+++ b/include/git2/checkout.h
@@ -67,7 +67,7 @@ GIT_BEGIN_DECL
* To emulate `git checkout -f`, use `GIT_CHECKOUT_FORCE`.
*
*
- * There are some additional flags to modified the behavior of checkout:
+ * There are some additional flags to modify the behavior of checkout:
*
* - GIT_CHECKOUT_ALLOW_CONFLICTS makes SAFE mode apply safe file updates
* even if there are conflicts (instead of cancelling the checkout).
diff --git a/include/git2/config.h b/include/git2/config.h
index 7bcca7d..b9649f9 100644
--- a/include/git2/config.h
+++ b/include/git2/config.h
@@ -75,7 +75,17 @@ typedef struct git_config_entry {
*/
GIT_EXTERN(void) git_config_entry_free(git_config_entry *);
-typedef int (*git_config_foreach_cb)(const git_config_entry *, void *);
+/**
+ * A config enumeration callback
+ *
+ * @param entry the entry currently being enumerated
+ * @param payload a user-specified pointer
+ */
+typedef int (*git_config_foreach_cb)(const git_config_entry *entry, void *payload);
+
+/**
+ * An opaque structure for a configuration iterator
+ */
typedef struct git_config_iterator git_config_iterator;
/**
@@ -581,7 +591,7 @@ GIT_EXTERN(int) git_config_iterator_glob_new(git_config_iterator **out, const gi
/**
* Perform an operation on each config variable matching a regular expression.
*
- * This behaviors like `git_config_foreach` with an additional filter of a
+ * This behaves like `git_config_foreach` with an additional filter of a
* regular expression that filters which config keys are passed to the
* callback.
*
@@ -711,11 +721,11 @@ GIT_EXTERN(int) git_config_parse_int64(int64_t *out, const char *value);
GIT_EXTERN(int) git_config_parse_path(git_buf *out, const char *value);
/**
- * Perform an operation on each config variable in given config backend
+ * Perform an operation on each config variable in a given config backend,
* matching a regular expression.
*
- * This behaviors like `git_config_foreach_match` except instead of all config
- * entries it just enumerates through the given backend entry.
+ * This behaves like `git_config_foreach_match` except that only config
+ * entries from the given backend entry are enumerated.
*
* The regular expression is applied case-sensitively on the normalized form of
* the variable name: the section and variable parts are lower-cased. The
diff --git a/include/git2/transport.h b/include/git2/transport.h
index 0c371bf..9264251 100644
--- a/include/git2/transport.h
+++ b/include/git2/transport.h
@@ -77,44 +77,73 @@ typedef struct {
*** Begin interface for credentials acquisition ***
*/
-/** Authentication type requested */
+/**
+ * Supported credential types
+ *
+ * This represents the various types of authentication methods supported by
+ * the library.
+ */
typedef enum {
- /* git_cred_userpass_plaintext */
+ /**
+ * A vanilla user/password request
+ * @see git_cred_userpass_plaintext_new
+ */
GIT_CREDTYPE_USERPASS_PLAINTEXT = (1u << 0),
- /* git_cred_ssh_key */
+ /**
+ * An SSH key-based authentication request
+ * @see git_cred_ssh_key_new
+ */
GIT_CREDTYPE_SSH_KEY = (1u << 1),
- /* git_cred_ssh_custom */
+ /**
+ * An SSH key-based authentication request, with a custom signature
+ * @see git_cred_ssh_custom_new
+ */
GIT_CREDTYPE_SSH_CUSTOM = (1u << 2),
- /* git_cred_default */
+ /**
+ * An NTLM/Negotiate-based authentication request.
+ * @see git_cred_default
+ */
GIT_CREDTYPE_DEFAULT = (1u << 3),
- /* git_cred_ssh_interactive */
+ /**
+ * An SSH interactive authentication request
+ * @see git_cred_ssh_interactive_new
+ */
GIT_CREDTYPE_SSH_INTERACTIVE = (1u << 4),
/**
- * Username-only information
+ * Username-only authentication request
*
- * If the SSH transport does not know which username to use,
- * it will ask via this credential type.
+ * Used as a pre-authentication step if the underlying transport
+ * (eg. SSH, with no username in its URL) does not know which username
+ * to use.
+ *
+ * @see git_cred_username_new
*/
GIT_CREDTYPE_USERNAME = (1u << 5),
/**
- * Credentials read from memory.
+ * An SSH key-based authentication request
+ *
+ * Allows credentials to be read from memory instead of files.
+ * Note that because of differences in crypto backend support, it might
+ * not be functional.
*
- * Only available for libssh2+OpenSSL for now.
+ * @see git_cred_ssh_key_memory_new
*/
GIT_CREDTYPE_SSH_MEMORY = (1u << 6),
} git_credtype_t;
-/* The base structure for all credential types */
typedef struct git_cred git_cred;
+/**
+ * The base structure for all credential types
+ */
struct git_cred {
- git_credtype_t credtype;
+ git_credtype_t credtype; /**< A type of credential */
void (*free)(git_cred *cred);
};