Unverified Commit cceefcda by Patrick Steinhardt Committed by GitHub

Merge pull request #4827 from tiennou/fix/documentation-fixups

Documentation fixups
parents 1621a37d 25da1acb
...@@ -67,7 +67,7 @@ GIT_BEGIN_DECL ...@@ -67,7 +67,7 @@ GIT_BEGIN_DECL
* To emulate `git checkout -f`, use `GIT_CHECKOUT_FORCE`. * 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 * - GIT_CHECKOUT_ALLOW_CONFLICTS makes SAFE mode apply safe file updates
* even if there are conflicts (instead of cancelling the checkout). * even if there are conflicts (instead of cancelling the checkout).
......
...@@ -75,7 +75,17 @@ typedef struct git_config_entry { ...@@ -75,7 +75,17 @@ typedef struct git_config_entry {
*/ */
GIT_EXTERN(void) git_config_entry_free(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; typedef struct git_config_iterator git_config_iterator;
/** /**
...@@ -252,7 +262,7 @@ GIT_EXTERN(int) git_config_open_level( ...@@ -252,7 +262,7 @@ GIT_EXTERN(int) git_config_open_level(
* Open the global/XDG configuration file according to git's rules * Open the global/XDG configuration file according to git's rules
* *
* Git allows you to store your global configuration at * Git allows you to store your global configuration at
* `$HOME/.config` or `$XDG_CONFIG_HOME/git/config`. For backwards * `$HOME/.gitconfig` or `$XDG_CONFIG_HOME/git/config`. For backwards
* compatability, the XDG file shouldn't be used unless the use has * compatability, the XDG file shouldn't be used unless the use has
* created it explicitly. With this function you'll open the correct * created it explicitly. With this function you'll open the correct
* one to write to. * one to write to.
...@@ -581,7 +591,7 @@ GIT_EXTERN(int) git_config_iterator_glob_new(git_config_iterator **out, const gi ...@@ -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. * 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 * regular expression that filters which config keys are passed to the
* callback. * callback.
* *
...@@ -711,11 +721,11 @@ GIT_EXTERN(int) git_config_parse_int64(int64_t *out, const char *value); ...@@ -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); 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. * matching a regular expression.
* *
* This behaviors like `git_config_foreach_match` except instead of all config * This behaves like `git_config_foreach_match` except that only config
* entries it just enumerates through the given backend entry. * entries from the given backend entry are enumerated.
* *
* The regular expression is applied case-sensitively on the normalized form of * The regular expression is applied case-sensitively on the normalized form of
* the variable name: the section and variable parts are lower-cased. The * the variable name: the section and variable parts are lower-cased. The
......
...@@ -77,44 +77,73 @@ typedef struct { ...@@ -77,44 +77,73 @@ typedef struct {
*** Begin interface for credentials acquisition *** *** 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 { typedef enum {
/* git_cred_userpass_plaintext */ /**
* A vanilla user/password request
* @see git_cred_userpass_plaintext_new
*/
GIT_CREDTYPE_USERPASS_PLAINTEXT = (1u << 0), 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_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_CREDTYPE_SSH_CUSTOM = (1u << 2),
/* git_cred_default */ /**
* An NTLM/Negotiate-based authentication request.
* @see git_cred_default
*/
GIT_CREDTYPE_DEFAULT = (1u << 3), 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), GIT_CREDTYPE_SSH_INTERACTIVE = (1u << 4),
/** /**
* Username-only information * Username-only authentication request
* *
* If the SSH transport does not know which username to use, * Used as a pre-authentication step if the underlying transport
* it will ask via this credential type. * (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), 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_SSH_MEMORY = (1u << 6),
} git_credtype_t; } git_credtype_t;
/* The base structure for all credential types */
typedef struct git_cred git_cred; typedef struct git_cred git_cred;
/**
* The base structure for all credential types
*/
struct git_cred { struct git_cred {
git_credtype_t credtype; git_credtype_t credtype; /**< A type of credential */
void (*free)(git_cred *cred); void (*free)(git_cred *cred);
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment