diff options
Diffstat (limited to 'src/config.h')
-rw-r--r-- | src/config.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/config.h b/src/config.h index 01e8465cc..3cd888c88 100644 --- a/src/config.h +++ b/src/config.h @@ -51,5 +51,26 @@ extern int git_config_file__ondisk(git_config_backend **out, const char *path); extern int git_config__normalize_name(const char *in, char **out); +/* internal only: does not normalize key and sets out to NULL if not found */ +extern int git_config__lookup_entry( + const git_config_entry **out, + const git_config *cfg, + const char *key, + bool no_errors); + +/* + * Lookup functions that cannot fail. These functions look up a config + * value and return a fallback value if the value is missing or if any + * failures occur while trying to access the value. + */ + +extern const char *git_config__get_string_force( + const git_config *cfg, const char *key, const char *fallback_value); + +extern int git_config__get_bool_force( + const git_config *cfg, const char *key, int fallback_value); + +extern int git_config__get_int_force( + const git_config *cfg, const char *key, int fallback_value); #endif |