diff options
| author | Patrick Steinhardt <ps@pks.im> | 2019-07-18 13:53:41 +0200 |
|---|---|---|
| committer | Patrick Steinhardt <ps@pks.im> | 2019-07-18 13:53:41 +0200 |
| commit | 658022c41affc7d9b5bd9b84b1d75ec909b820c6 (patch) | |
| tree | 031b076abf8466b6f449fbe1e54d1c98c95eb061 /include/git2 | |
| parent | 343fb83a4d3550fe6464ac52a9f4e57bdb6d5b24 (diff) | |
| download | libgit2-658022c41affc7d9b5bd9b84b1d75ec909b820c6.tar.gz | |
configuration: cvar -> configmap
`cvar` is an unhelpful name. Refactor its usage to `configmap` for more
clarity.
Diffstat (limited to 'include/git2')
| -rw-r--r-- | include/git2/config.h | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/include/git2/config.h b/include/git2/config.h index 0bea323b2..abf5bbbd0 100644 --- a/include/git2/config.h +++ b/include/git2/config.h @@ -92,20 +92,20 @@ typedef struct git_config_iterator git_config_iterator; * Config var type */ typedef enum { - GIT_CVAR_FALSE = 0, - GIT_CVAR_TRUE = 1, - GIT_CVAR_INT32, - GIT_CVAR_STRING -} git_cvar_t; + GIT_CONFIGMAP_FALSE = 0, + GIT_CONFIGMAP_TRUE = 1, + GIT_CONFIGMAP_INT32, + GIT_CONFIGMAP_STRING +} git_configmap_t; /** * Mapping from config variables to values. */ typedef struct { - git_cvar_t cvar_type; + git_configmap_t type; const char *str_match; int map_value; -} git_cvar_map; +} git_configmap; /** * Locate the path to the global configuration file @@ -623,7 +623,7 @@ GIT_EXTERN(int) git_config_foreach_match( * * A mapping array looks as follows: * - * git_cvar_map autocrlf_mapping[] = { + * git_configmap autocrlf_mapping[] = { * {GIT_CVAR_FALSE, NULL, GIT_AUTO_CRLF_FALSE}, * {GIT_CVAR_TRUE, NULL, GIT_AUTO_CRLF_TRUE}, * {GIT_CVAR_STRING, "input", GIT_AUTO_CRLF_INPUT}, @@ -644,7 +644,7 @@ GIT_EXTERN(int) git_config_foreach_match( * @param out place to store the result of the mapping * @param cfg config file to get the variables from * @param name name of the config variable to lookup - * @param maps array of `git_cvar_map` objects specifying the possible mappings + * @param maps array of `git_configmap` objects specifying the possible mappings * @param map_n number of mapping objects in `maps` * @return 0 on success, error code otherwise */ @@ -652,20 +652,20 @@ GIT_EXTERN(int) git_config_get_mapped( int *out, const git_config *cfg, const char *name, - const git_cvar_map *maps, + const git_configmap *maps, size_t map_n); /** * Maps a string value to an integer constant * * @param out place to store the result of the parsing - * @param maps array of `git_cvar_map` objects specifying the possible mappings + * @param maps array of `git_configmap` objects specifying the possible mappings * @param map_n number of mapping objects in `maps` * @param value value to parse */ GIT_EXTERN(int) git_config_lookup_map_value( int *out, - const git_cvar_map *maps, + const git_configmap *maps, size_t map_n, const char *value); |
