diff options
author | Calvin Wan <calvinwan@google.com> | 2023-09-29 23:20:51 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2023-09-30 00:14:57 +0200 |
commit | b1bda751739d90e1a94b47397676bcb8eebf16d5 (patch) | |
tree | 63b802377016c46d878d918633ebb1a54c015a5b /config.h | |
parent | config: correct bad boolean env value error message (diff) | |
download | git-b1bda751739d90e1a94b47397676bcb8eebf16d5.tar.xz git-b1bda751739d90e1a94b47397676bcb8eebf16d5.zip |
parse: separate out parsing functions from config.h
The files config.{h,c} contain functions that have to do with parsing,
but not config.
In order to further reduce all-in-one headers, separate out functions in
config.c that do not operate on config into its own file, parse.h,
and update the include directives in the .c files that need only such
functions accordingly.
Signed-off-by: Calvin Wan <calvinwan@google.com>
Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'config.h')
-rw-r--r-- | config.h | 14 |
1 files changed, 1 insertions, 13 deletions
@@ -4,7 +4,7 @@ #include "hashmap.h" #include "string-list.h" #include "repository.h" - +#include "parse.h" /** * The config API gives callers a way to access Git configuration files @@ -243,16 +243,6 @@ int config_with_options(config_fn_t fn, void *, * The following helper functions aid in parsing string values */ -int git_parse_ssize_t(const char *, ssize_t *); -int git_parse_ulong(const char *, unsigned long *); -int git_parse_int(const char *value, int *ret); - -/** - * Same as `git_config_bool`, except that it returns -1 on error rather - * than dying. - */ -int git_parse_maybe_bool(const char *); - /** * Parse the string to an integer, including unit factors. Dies on error; * otherwise, returns the parsed result. @@ -385,8 +375,6 @@ int git_config_rename_section(const char *, const char *); int git_config_rename_section_in_file(const char *, const char *, const char *); int git_config_copy_section(const char *, const char *); int git_config_copy_section_in_file(const char *, const char *, const char *); -int git_env_bool(const char *, int); -unsigned long git_env_ulong(const char *, unsigned long); int git_config_system(void); int config_error_nonbool(const char *); #if defined(__GNUC__) |